How can I increase disk space for my Amazon ECS container on AWS Fargate?
3 minute read
I want to increase disk space for my Amazon Elastic Container Service (Amazon ECS) container on AWS Fargate.
By default, Fargate tasks that are launched with platform version 1.40 include a task storage size of 20 GiB as a single ephemeral volume. If you need more than 20 GiB of storage, you can configure more storage using two options:
Use Fargate's ephemeral storage option for storage up to 200 GiB. Ephemeral storage is non-persistent storage.
1. Create a security group for your Amazon EFS mount targets. Then, add an inbound rule to accept NFS traffic on port 2049 from the source's task security group.
2. Create an Amazon EFS file system, and then attach the security group from step 1 to your mount targets. Note: By default, a mount target is configured in each Availability Zone in a given AWS Region. Select all the Availability Zones where the VPC subnets for the Fargate service are located.
3. Note the file system ID of your file system (for example, fs-12345678).
4. Create or update a task definition to configure a volume for the Amazon ECS task that has your Amazon EFS file system. For example: