Amazon ECS helps a local integration with Amazon EBS volumes for data-intensive workloads


Voiced by Polly

Right now we’re saying that Amazon Elastic Container Service (Amazon ECS) helps an integration with Amazon Elastic Block Retailer (Amazon EBS), making it simpler to run a wider vary of knowledge processing workloads. You’ll be able to provision Amazon EBS storage on your ECS duties operating on AWS Fargate and Amazon Elastic Compute Cloud (Amazon EC2) while not having to handle storage or compute.

Many organizations select to deploy their functions as containerized packages, and with the introduction of Amazon ECS integration with Amazon EBS, organizations can now run extra kinds of workloads than earlier than.

You’ll be able to run information workloads requiring storage that helps excessive transaction volumes and throughput, equivalent to extract, rework, and cargo (ETL) jobs for large information, which must fetch present information, carry out processing, and retailer this processed information for downstream use. As a result of the storage lifecycle is absolutely managed by Amazon ECS, you don’t must construct any extra scaffolding to handle infrastructure updates, and consequently, your information processing workloads are actually extra resilient whereas concurrently requiring much less effort to handle.

Now you possibly can select from quite a lot of storage choices on your containerized functions operating on Amazon ECS:

  • Your Fargate duties get 20 GiB of ephemeral storage by default. For functions that want extra cupboard space to obtain massive container photographs or for scratch work, you possibly can configure as much as 200 GiB of ephemeral storage on your Fargate duties.
  • For functions that span many duties that want concurrent entry to a shared dataset, you possibly can configure Amazon ECS to mount the Amazon Elastic File System (Amazon EFS) file system to your ECS duties operating on each EC2 and Fargate. Frequent examples of such workloads embody internet functions equivalent to content material administration programs, inside DevOps instruments, and machine studying (ML) frameworks. Amazon EFS is designed to be obtainable throughout a Area and might be concurrently connected to many duties.
  • For functions that want high-performance, low-cost storage that doesn’t have to be shared throughout duties, you possibly can configure Amazon ECS to provision and fix Amazon EBS storage to your duties operating on each Amazon EC2 and Fargate. Amazon EBS is designed to supply block storage with low latency and excessive efficiency inside an Availability Zone.

To study extra, see Utilizing information volumes in Amazon ECS duties and persistent storage finest practices within the AWS documentation.

Getting began with EBS quantity integration to your ECS duties
You’ll be able to configure the amount mount level on your container within the process definition and cross Amazon EBS storage necessities on your Amazon ECS process at runtime. For many use circumstances, you will get began by merely offering the scale of the amount wanted for the duty. Optionally, you possibly can configure all EBS quantity attributes and the file system you need the amount formatted with.

1. Create a process definition
Go to the Amazon ECS console, navigate to Job definitions, and select Create new process definition.

Within the Storage part, select Configure at deployment to set EBS quantity as a brand new configuration kind. You’ll be able to provision and fix one quantity per process for Linux file programs.

While you select Configure at process definition creation, you possibly can configure present storage choices equivalent to bind mounts, Docker volumes, EFS volumes, Amazon FSx for Home windows File Server volumes, or Fargate ephemeral storage.

Now you possibly can choose a container within the process definition, the supply EBS quantity, and supply a mount path the place the amount will probably be mounted within the process.

It’s also possible to use $aws ecs register-task-definition --cli-input-json file://instance.json command line to register a process definition so as to add an EBS quantity. The next snippet is a pattern, and process definitions are saved in JSON format.

{
    "household": "nginx"
    ...
    "containerDefinitions": [
        {
            ...
            "mountPoints": [
                "containerPath": "/foo",
                "sourceVolume": "new-ebs-volume"
            ],
            "title": "nginx",
            "picture": "nginx"
        }
    ],
    "volumes": [
       {
           "name": "/foo",
           "configuredAtRuntime": true
       }
    ]
}

2. Deploy and run your process with EBS quantity
Now you possibly can run a process by choosing your process in your ECS cluster. Go to your ECS cluster and select Run new process. Word which you could choose the compute choices, the launch kind, and your process definition.

Word: Whereas this instance goes via deploying a standalone process with an connected EBS quantity, you may as well configure a brand new or present ECS service to make use of EBS volumes with the specified configuration.

You’ve gotten a brand new Quantity part the place you possibly can configure the extra storage. The quantity title, kind, and mount factors are those who you outlined in your process definition. Select your EBS quantity sorts, sizes (GiB), IOPs, and the specified throughput.

You can not connect an present EBS quantity to an ECS process. However if you wish to create a quantity from an present snapshot, you’ve got the choice to decide on your snapshot ID. If you wish to create a brand new quantity, then you possibly can go away this area empty. You’ll be able to select the file system kind, both ext3 or ext4 file programs on Linux.

By default, when a process is terminated, Amazon ECS deletes the connected quantity. Should you want the info within the EBS quantity to be retained after the duty exits, examine Delete on termination. Additionally, you want to create an AWS Id and Entry Administration (IAM) position for quantity administration that accommodates the related permissions to permit Amazon ECS to make API calls in your behalf. For extra info on this coverage, see infrastructure position within the AWS documentation.

It’s also possible to configure encryption in your EBS volumes utilizing both Amazon managed keys and buyer managed keys. To study extra in regards to the choices, see our Amazon EBS encryption within the AWS documentation.

After configuring all process settings, select Create to begin your process.

3. Deploy and run your process with EBS quantity
As soon as your process has began, you possibly can see the amount info on the duty definition particulars web page. Select a process and choose the Volumes tab to search out your created EBS quantity particulars.

Your group can set up the event and operations of EBS volumes extra effectively. For instance, software builders can configure the trail the place your software expects storage to be obtainable within the process definition, and DevOps engineers can configure the precise EBS quantity attributes at runtime when the applying is deployed.

This permits DevOps engineers to deploy the identical process definition to totally different environments with differing EBS quantity configurations, for instance, gp3 volumes within the growth environments and io2 volumes in manufacturing.

Now obtainable
Amazon ECS integration with Amazon EBS is obtainable in 9 AWS Areas: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Frankfurt), Europe (Eire), and Europe (Stockholm). You solely pay for what you utilize, together with EBS volumes and snapshots. To study extra, see the Amazon EBS pricing web page and Amazon EBS volumes in ECS within the AWS documentation.

Give it a strive now and ship suggestions to our public roadmap, AWS re:Put up for Amazon ECS, or via your common AWS Help contacts.

— Channy

P.S. Particular because of Maish Saidel-Keesing, a senior enterprise developer advocate at AWS for his contribution in scripting this weblog publish.



Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox