Skip to content

Instantly share code, notes, and snippets.

@tuapuikia
Forked from marcelog/aws-sqs.policy
Created February 22, 2020 10:56
Show Gist options
  • Save tuapuikia/96da7a65ed0d4250bc3d92202f4c7a41 to your computer and use it in GitHub Desktop.
Save tuapuikia/96da7a65ed0d4250bc3d92202f4c7a41 to your computer and use it in GitHub Desktop.
SQS Policy to allow an S3 bucket to publish messages
{
"Version": "2012-10-17",
"Id": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME/SQSDefaultPolicy",
"Statement": [
{
"Sid": "example-statement-ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "SQS:SendMessage",
"Resource": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:*:*:YOUR-S3-BUCKET"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment