AWS AmazonECS high security documentation change
Summary
Added security guidance about S3 bucket ownership validation to prevent bucket takeover attacks
Security assessment
Directly addresses a security risk (bucket takeover attacks) by recommending IAM policy conditions to restrict bucket access. Provides concrete mitigation for a potential security vulnerability.
Diff
diff --git a/AmazonECS/latest/developerguide/task_execution_IAM_role.md b/AmazonECS/latest/developerguide/task_execution_IAM_role.md index 0e1a85030..e62bc03c7 100644 --- a//AmazonECS/latest/developerguide/task_execution_IAM_role.md +++ b//AmazonECS/latest/developerguide/task_execution_IAM_role.md @@ -384,0 +385,18 @@ JSON +### Important Security Consideration + +When using Amazon ECS features that integrate with Amazon S3 buckets, implement bucket ownership validation to prevent bucket takeover attacks. Without proper validation, if an Amazon S3 bucket is deleted and recreated by a malicious actor with the same name, your tasks may unknowingly load malicious configurations or send sensitive data to attacker-controlled buckets. + +**Recommended IAM Policy Condition:** + + + "Condition": { + "StringEquals": { + "aws:ResourceAccount": "TRUSTED-ACCOUNT-ID" + } + } + + +Replace `TRUSTED-ACCOUNT-ID` with the AWS account ID that owns the S3 bucket. + +This condition ensures your task execution role can only access Amazon S3 buckets owned by the specified trusted account. +