Skip to content

Commit f066fc2

Browse files
committed
updated README.md file with more permissions for one off task
1 parent 5a47e11 commit f066fc2

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ We recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/I
116116
* [Monitor the activity](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#keep-a-log) of the credentials used in GitHub Actions workflows.
117117

118118
## Permissions
119-
120-
This action requires the following minimum set of permissions:
121-
119+
120+
Running a service requires the following minimum set of permissions:
121+
122122
```json
123123
{
124124
"Version":"2012-10-17",
@@ -156,7 +156,38 @@ This action requires the following minimum set of permissions:
156156
]
157157
}
158158
```
159-
159+
160+
Running a one-off/stand-alone task requires the following minimum set of permissions:
161+
162+
```json
163+
{
164+
"Version": "2012-10-17",
165+
"Statement": [
166+
{
167+
"Sid": "RegisterTaskDefinition and runTask",
168+
"Effect": "Allow",
169+
"Action": [
170+
"ecs:RunTask",
171+
"ecs:RegisterTaskDefinition",
172+
"ecs:DescribeTasks"
173+
],
174+
"Resource": "*"
175+
},
176+
{
177+
"Sid":"PassRolesInTaskDefinition",
178+
"Effect":"Allow",
179+
"Action":[
180+
"iam:PassRole"
181+
],
182+
"Resource":[
183+
"arn:aws:iam::<aws_account_id>:role/<task_definition_task_role_name>",
184+
"arn:aws:iam::<aws_account_id>:role/<task_definition_task_execution_role_name>"
185+
]
186+
}
187+
]
188+
}
189+
190+
```
160191
Note: the policy above assumes the account has opted in to the ECS long ARN format.
161192

162193
## AWS CodeDeploy Support

0 commit comments

Comments
 (0)