Amazon EBS volumes - Amazon Elastic Container Service

Amazon EBS volumes

Amazon Elastic Block Store (Amazon EBS) volumes provide highly available, cost-effective, durable, high-performance block storage for data-intensive workloads. Amazon EBS volumes can be used with Amazon ECS tasks for high throughput and transaction-intensive applications. You can configure at most 1 EBS volume for attachment to a standalone ECS task when you run the task. Or, you can configure 1 EBS volume per task for attachment to each task launched via an ECS service when you create or update the service.

Amazon EBS volumes that are attached to Amazon ECS tasks are managed by ECS on your behalf, and can be encrypted with AWS Key Management Service (AWS KMS) keys to protect your data. You can either configure new, empty volumes for attachment, or you can use snapshots to load data from existing volumes.

To monitor your volume's performance, you can also use Amazon EBS Amazon CloudWatch metrics. For more information about metrics, see Amazon CloudWatch metrics for Amazon EBS in the Amazon EC2 User Guide.

For more information about Amazon EBS volumes, see Amazon EBS volumes in the Amazon EC2 User Guide.

AWS Regions and Availability Zones for Amazon EBS volumes

Amazon EBS volumes can be attached to Amazon ECS tasks in the following AWS Regions:

Region name Region code

US East (N. Virginia)

us-east-1

US East (Ohio)

us-east-2

US West (N. California)

us-west-1

US West (Oregon)

us-west-2

Africa (Cape Town)

af-south-1

Asia Pacific (Hong Kong)

ap-east-1

Asia Pacific (Hyderabad)

ap-south-2

Asia Pacific (Jakarta)

ap-southeast-3

Asia Pacific (Mumbai)

ap-south-1

Asia Pacific (Osaka)

ap-northeast-3

Asia Pacific (Seoul)

ap-northeast-2

Asia Pacific (Singapore)

ap-southeast-1

Asia Pacific (Sydney)

ap-southeast-2

Asia Pacific (Tokyo)

ap-northeast-1

Canada (Central)

ca-central-1

Europe (Frankfurt)

eu-central-1

Europe (Ireland)

eu-west-1

Europe (London)

eu-west-2

Europe (Milan)

eu-south-1

Europe (Paris)

eu-west-3

Europe (Spain)

eu-south-2

Europe (Stockholm)

eu-north-1

Europe (Zurich)

eu-central-2

Middle East (Bahrain)

me-south-1

Middle East (UAE)

me-central-1

South America (São Paulo)

sa-east-1
Important

You cannot configure Amazon EBS volumes for attachment to Fargate Amazon ECS tasks in the euc1-az2 and use1-az3 Availability Zones.

Amazon EBS volume considerations

Consider the following when using Amazon EBS volumes:

  • Amazon EBS volumes are supported only for Linux tasks hosted on Fargate, and EC2 launch type tasks hosted on Nitro-based Linux instances with Amazon ECS-optimized Amazon Machine Images (AMIs).

  • For tasks that are hosted on Fargate, Amazon EBS volumes are supported on platform version 1.4.0 or later (Linux). For more information, see Fargate Linux platform versions.

  • For tasks that are hosted on Amazon EC2 Linux instances, Amazon EBS volumes are supported on ECS-optimized AMI 20231219 or later. For more information, see Retrieving Amazon ECS-Optimized AMI metadata.

  • The magnetic (standard) Amazon EBS volume type is not supported for tasks hosted on Fargate. For more information about Amazon EBS volume types, see Amazon EBS volumes in the Amazon EC2 User Guide.

  • An Amazon ECS infrastructure IAM role is required when creating a service or a standalone task that is configuring a volume at deployment. You can attach the AWS managed AmazonECSInfrastructureRolePolicyForVolumes IAM policy to the role, or you can use the managed policy as a guide to create and attach your own policy with permissions that meet your specific needs. For more information, see Amazon ECS infrastructure IAM role.

  • You can attach at most one Amazon EBS volume to each Amazon ECS task, and it must be a new volume. You cannot attach an existing Amazon EBS volume to a task. However, you can configure a new Amazon EBS volume at deployment using the snapshot of an existing volume.

  • You can configure Amazon EBS volumes at deployment only for services that use the rolling update deployment type and the Replica scheduling strategy.

  • Amazon ECS automatically adds the reserved tags AmazonECSCreated and AmazonECSManaged. If you remove these tags from the volume, Amazon ECS won't be able to manage the volume on your behalf. For more information about tagging Amazon EBS volumes, see Tagging Amazon EBS volumes. For more information about tagging Amazon ECS resources, see Tagging your Amazon ECS resources.

  • Provisioning volumes from a snapshot of an Amazon EBS volume that contains partitions is not supported.

  • Volumes that are attached to tasks that are managed by a service are not preserved and are always deleted upon task termination.

  • You can't attach an Amazon EBS volume to an EC2 launch type task that's launched on a container instance based on the Xen system. For more information about instance types, see Instance types in the Amazon EC2 User Guide.

  • You can't configure Amazon EBS volumes for attachment to Amazon ECS tasks that are running on AWS Outposts.