Skip to content

Instantly share code, notes, and snippets.

@alanwill
Created July 6, 2014 08:48
Show Gist options
  • Save alanwill/922fab81b13d74beac5c to your computer and use it in GitHub Desktop.
Save alanwill/922fab81b13d74beac5c to your computer and use it in GitHub Desktop.
Cloudtrail policy for SQS queue to receive messages from various SNS topics in multiple accounts
{
"Version": "2008-10-17",
"Id": "arn:aws:sqs:us-east-1:<core-account-number>:cloudtrail-notifications/SQSDefaultPolicy",
"Statement": [
{
"Sid": "Sid1385789515788",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SQS:SendMessage",
"Resource": "arn:aws:sqs:us-east-1:<core-account-number>:cloudtrail-notifications",
"Condition": {
"ArnEquals": {
"aws:SourceArn": [
"arn:aws:sns:*:<account#1>:cloudtrail-notifications",
"arn:aws:sns:*:<account#2>:cloudtrail-notifications",
"arn:aws:sns:*:<account#3>:cloudtrail-notifications"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment