I'm trying to write a cross account aws cli command to subscribe to a topic and create a filter for that subscription at the same time. Below is how my command looks like.
aws sns subscribe --topic-arn arn:aws:sns:region:accountId:my_topic --protocol sqs --notification-endpoint arn:aws:sqs:region:differentAccountId:my_sqs_queue --attributes "{'RawMessageDelivery': 'true', 'FilterPolicy': '{\"filter\": [\"value1\", \"value2\"]}'}"
I'm getting below error when I run this.
Unknown options: --attributes, [\value1\,, \value2\]}'}, {'RawMessageDelivery': 'true', 'FilterPolicy': '{" filter\:
I've access to admin access both the aws accounts. Any suggestions on what I'm doing wrong?
EDIT: I'm running this in VS Code powershell terminal in windows.
KeyName1=string,KeyName2=string
. – Dyslalia--attributes "RawMessageDelivery=true"
and still getting the same error. I tried--attributes "RawMessageDelivery=\"true\""
and--attributes "RawMessageDelivery='true'"
but it threw a similar errorUnknown options: --attributes, RawMessageDelivery=true
– Archive