{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SNS:Subscribe",
"Resource": "arn:aws:sns:*:*:test-pipeline"
},
{
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SNS:Publish",
"Resource": "arn:aws:sns:*:*:test-pipeline"
}
]
}
I am not sure why I get the error as
Error code: InvalidParameter - Error message: An error occurred while setting the attribute access policy. Invalid parameter: Every policy statement must have a unique ID
The ID is not mandatory, and when I have only one block in the array, it just works
Its optional, but not for every service, such as SNS. From docs:
Some AWS services (for example, Amazon SQS or Amazon SNS) might require this element and have uniqueness requirements for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With