1 year ago

#346191

test-img

Danielle

Query expression with aws policy query

Getting response back from AWS CLI call:

aws sns get-topic-attributes --query 'Attributes.Policy'

gives me the whole policy.

I would like to query specifically on one policy statement, by value of the Sid.

I Have tried:

  • --query "[Attributes.Policy [?Statement.Sid==`mySid`]"
  • --query "[Attributes.Policy.Statement [?Sid==`mySid`]"
  • --query="(Attributes.Policy.Statement[?Sid=='mySid'])"

and various other fruitless attempts.

Any help is appreciated.

amazon-web-services

aws-cli

jmespath

0 Answers

Your Answer

Accepted video resources