AWS AmazonECS high security documentation change
Summary
Updated IAM policy to use wildcard account ID in resource ARN and added iam:PassedToService condition
Security assessment
Added a condition restricting role usage to ECS service, preventing potential privilege escalation by ensuring the role can only be passed to ECS. This addresses security by enforcing service-linked role constraints.
Diff
diff --git a/AmazonECS/latest/developerguide/codedeploy_IAM_role.md b/AmazonECS/latest/developerguide/codedeploy_IAM_role.md index 74be815dd..7ba171451 100644 --- a//AmazonECS/latest/developerguide/codedeploy_IAM_role.md +++ b//AmazonECS/latest/developerguide/codedeploy_IAM_role.md @@ -175,3 +175,4 @@ JSON - "Resource": [ - "arn:arn:aws:iam::111122223333:role/ecs-code-deploy-role" - ] + "Resource": ["arn:aws:iam::*:role/code-deploy-role"], + "Condition": { + "StringEquals": {"iam:PassedToService": "ecs.amazonaws.com"} + }