How can I increase disk space for my Amazon ECS container on AWS Fargate?
I want to increase disk space for my Amazon Elastic Container Service (Amazon ECS) container on AWS Fargate.
"I want to increase disk space for my Amazon Elastic Container Service (Amazon ECS) container on AWS Fargate.Short descriptionAmazon ECS tasks that are hosted on Fargate platform version 1.4.0 or later receive at least 20 GiB of ephemeral storage. For more than 20 GiB of storage, use one of the following options:Fargate ephemeral storage for storage sizes up to 200 GiB. Ephemeral storage is non persistent. For steps on using ephemeral storage, see the Resolution section.Amazon Elastic File System (Amazon EFS) volumes for scalable file storage. Amazon EFS volumes provide persistent storage. For steps on using Amazon EFS volumes, see How do I mount an Amazon EFS file system on an Amazon ECS container or task running on Fargate?Note: Your Amazon EFS file system and Fargate tasks must be in the same Amazon Virtual Private Cloud (Amazon VPC).ResolutionUse Fargate ephemeral storageYou can use either version 2 of the Amazon ECS console, or AWS Command Line Interface.Note: If you receive errors when running the AWS CLI, confirm that you're running a recent version of the AWS CLI.Use the V2 consoleNote: The ephemeral storage option isn't available in the classic console.Open the Amazon ECS console.In the navigation pane, choose Task definitions.Choose Create a new task definition. You can also revise an existing task definition.Add the required information of the container, and then choose Next.Under Storage, for ephemeral storage, provide the required amount of ephemeral storage. The minimum is 21 GiB and the maximum is 200 GiB.Choose Next, and then choose Create.Use the AWS Command Line Interface (AWS CLI)1.    Run the register-task-definition command to create or update the task definition with increased storage up to 200 GiB. Use the --ephemeral-storage flag.$ aws ecs register-task-definition --region <example-region> --cli-input-json file://<path\_to\_json>/demo.json --ephemeral-storage sizeInGiB=<example-integer>Note: Replace example-region with your AWS Region and example-integer with your integer.2.    Describe the task definition to confirm the updated ephemeral storage.aws ecs describe-task-definition --task-definition <example-task-definition-name> --region <example-region>Note: Replace example-task-definition-name with your task definition name.Example output:"ephemeralStorage": {            "sizeInGiB": <example-value>        }For more information on configuring ephemeral storage, see Bind mount examples.Follow"