Created
August 22, 2022 06:58
-
-
Save nivleshc/98a094321008253bfd2b3b70b2353f83 to your computer and use it in GitHub Desktop.
This gist contains the Resources section of template.yaml from the blog-create-evergreen-golden-amis repository. It shows the IAM policy for the Amazon SNS Topic resource.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IAM role that will be attached to the AWS SNS Topic. This will allow AWS EventBridge events to publish messages to it | |
EvergreenAMISNSTopicPolicy: | |
Type: AWS::SNS::TopicPolicy | |
Properties: | |
PolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Sid: __default_statement_ID | |
Effect: Allow | |
Principal: | |
"AWS": "*" | |
Action: | |
- sns:GetTopicAttributes | |
- sns:SetTopicAttributes | |
- sns:AddPermission | |
- sns:RemovePermission | |
- sns:DeleteTopic | |
- sns:Subscribe | |
- sns:ListSubscriptionsByTopic | |
- sns:Publish | |
Resource: !Ref EvergreenAMISNSTopic | |
Condition: | |
StringEquals: | |
"AWS:SourceOwner": !Ref 'AWS::AccountId' | |
- Sid: Allow_CloudWatchEvents_To_Publish | |
Effect: Allow | |
Action: | |
- sns:Publish | |
Principal: | |
"Service": "events.amazonaws.com" | |
Resource: !Ref EvergreenAMISNSTopic | |
Topics: | |
- !Ref EvergreenAMISNSTopic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment