AWS Security ChangesHomeSearch

AWS AmazonECS high security documentation change

Service: AmazonECS · 2026-05-22 · Security-related high

File: AmazonECS/latest/developerguide/task-iam-roles.md

Summary

Expanded security warnings about lack of task isolation on EC2/Managed Instances/Anywhere, including risks of accessing IMDS and co-located task data.

Security assessment

Strengthens security documentation by explicitly warning about containers accessing instance metadata (IMDS), IAM credentials, and cross-task data exposure. Recommends Fargate for strict isolation needs, showing security mitigation guidance.

Diff

diff --git a/AmazonECS/latest/developerguide/task-iam-roles.md b/AmazonECS/latest/developerguide/task-iam-roles.md
index 14622f69a..61eb91958 100644
--- a//AmazonECS/latest/developerguide/task-iam-roles.md
+++ b//AmazonECS/latest/developerguide/task-iam-roles.md
@@ -30 +30 @@ The following are the benefits of using task roles:
-Containers are not a security boundary and the use of task IAM roles does not change this. Each task running on Fargate has its own isolation boundary and does not share the underlying kernel, CPU resources, memory resources, or elastic network interface with another task. For EC2 and External Container Instances on ECS, there is no task isolation (unlike with Fargate) and containers can potentially access credentials for other tasks on the same container instance. They can also access permissions assigned to the [ECS container instance role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html). Follow the recommendations in [Roles recommendations](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-iam-roles.html#security-iam-roles-recommendations) to block access to the Amazon EC2 Instance Metadata Service for containers (For more information, see [Use the Instance Metadata Service to access instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) in the _Amazon EC2 User Guide_). 
+Containers are not a security boundary and the use of task IAM roles does not change this. Each task running on Fargate has its own isolation boundary and does not share the underlying kernel, CPU resources, memory resources, or elastic network interface with another task. For workloads with strict isolation requirements, use Fargate. For EC2, ECS Managed Instances, and ECS Anywhere container instances, there is no task isolation and containers can potentially access credentials for other tasks on the same container instance. They can also access permissions assigned to the [ECS container instance role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) and other sensitive data such as instance metadata and IAM role credentials accessible through the Amazon EC2 Instance Metadata Service (IMDS), as well as data from co-located tasks. Follow the recommendations in [Roles recommendations](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-iam-roles.html#security-iam-roles-recommendations) to prevent containers from accessing the Amazon EC2 Instance Metadata Service on your container instances (For more information, see [Use the Instance Metadata Service to access instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) in the _Amazon EC2 User Guide_).