Closed mrichman closed 4 years ago
I get this error creating an SNS topic policy resource: I get the error "Invalid parameter: Policy Error: null (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 3c0ff853-89aa-5944-b68c-af673e2bcb6c)"
I get the error "Invalid parameter: Policy Error: null (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 3c0ff853-89aa-5944-b68c-af673e2bcb6c)"
Here is the relevant template section:
SynthesisTaskTopic: Type: AWS::SNS::Topic Properties: DisplayName: SynthesisTaskTopic TopicName: SynthesisTaskTopic SynthesisTaskTopicPolicy: Type: AWS::SNS::TopicPolicy Properties: PolicyDocument: Version: '2012-10-17' Statement: - Sid: AllowPollySNSPermissions Effect: Allow Principal: Service: polly.amazonaws.com Action: - sns:* Resource: !Ref SynthesisTaskTopic Topics: - !Ref SynthesisTaskTopic
This passes both sam validate and cfn-lint.
sam validate
cfn-lint
I need to grant the Polly service access to publish to my SNS topic.
So it turns out Polly doesn't work with resource-based policies.
I get this error creating an SNS topic policy resource:
I get the error "Invalid parameter: Policy Error: null (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 3c0ff853-89aa-5944-b68c-af673e2bcb6c)"
Here is the relevant template section:
This passes both
sam validate
andcfn-lint
.I need to grant the Polly service access to publish to my SNS topic.