How to Increase Amazon ECS Container Disk Space on Fargate? AWS

If the underlying container host system runs out of disc storage, we’ll need to Increase Disk Space for Amazon ECS Container on Fargate. Let’s have a look at how we might expand our disc space today.

Fargate Disk Space for Amazon ECS Container services Fargate tasks with platform version 1.40 have a task storage size of 20 GB, which is stored as a single ephemeral volume by default. Amazon Elastic File System is one of the tasks that use the Fargate launch type (Amazon EFS). The “No space left on device” error message appears when the underlying container host computer runs out of disc capacity.

This means that in order to process massive datasets and files, the application workload running inside the aws ecs container Service needs a lot of storage. Integration of Fargate tasks with Amazon EFS volumes can be used to overcome this problem.

Increase Amazon ECS Container Disk Space on Fargate

  1. For the Amazon EFS mount targets, we must first build a security group.

Then, using the source’s task security group, we create an inbound rule to accept NFS traffic on port 2049.

  1. We construct an Amazon EFS file system and then connect the mount targets to the security group.3. In addition, we need to note the file system ID of the file system.
  2. Configure a volume for the AWS ECS container service job that uses the Amazon EFS file system by creating or updating a task specification.

Consider the following

scenario:

“volumes”: [

{

“name”: “efs-test-volume”,

“efsVolumeConfiguration”: {

“fileSystemId”: “fs-12345678”,

“transitEncryption”: “ENABLED”

}

}

]

Make sure that fs-12345678 is replaced with the correct file system ID. 5. Later, we build a mount point for the volume inside the container using the container definitions section.

Consider the following scenario:

“containerDefinitions”: [

{

“memory”: 128,

“portMappings”: [

{

“hostPort”: 80,

“containerPort”: 80,

“protocol”: “tcp”

}

],

“essential”: true,

“mountPoints”: [

{

“containerPath”: “/mount/path/inside/container”,

“sourceVolume”: “efs-test-volume”

}

],

“name”: “nginx”,

“image”: “nginx”

}

]

  1. Finally, using the revised task specification, we perform the task.

At Velan, our server support engineers can help to increase ECS volume. If you are interested in our service, please fill the Quick connect form to get in touch with us.

Credentials

Quick Connect With Us

captcha reload