Created
April 5, 2020 13:22
-
-
Save hades2510/1c5d3ef078eb1e2076121f35b942691c to your computer and use it in GitHub Desktop.
IAM Policy Lambda SQS Triggered to start an ECS Task
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "S1", | |
"Effect": "Allow", | |
"Action": "iam:PassRole", | |
"Resource": "arn:aws:iam::aws-acount-id:role/ecs-task-role" | |
}, | |
{ | |
"Sid": "S2", | |
"Effect": "Allow", | |
"Action": [ | |
"sqs:ReceiveMessage", | |
"sqs:DeleteMessage", | |
"sqs:GetQueueAttributes", | |
"iam:PassRole", | |
"ecs:RunTask", | |
], | |
"Resource": [ | |
"arn:aws:sqs:us-west-1:aws-acount-id:sqs-name", | |
"arn:aws:iam::aws-acount-id:role/ecsTaskExecutionRole", | |
"arn:aws:ecs:us-west-1:aws-acount-id:task-definition/ecs-task-definition" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment