When you creating Amazon EC2 instance you can choose various types of EBS, and for your purpose you can choose EBS Provisioned IOPS (SSD). One solution will be to made full recovery backup plan of your databases and put backups (FULL, DIFF and LOG) to Amazon S3 so you can do restore and recovery after instance restarting, but for me, you risk too much again. Finally, you can take advantage of this new feature on AWS Fargate Platform Version 1.4, or by using the LATEST platform version in your task definition.If you put your databases on Ephemeral storage on EC2 instance, then you will lose all your data on that storage after instance restarting. See the AWS Fargate documentation for more information. Aside from support in AWS Copilot, this feature is supported when deploying Fargate tasks via AWS CloudFormation as well as the AWS CLI. As mentioned in the beginning of the blog, this feature enables customers that want to take advantage of serverless functionality with Fargate but were previously constrained by the default ephemeral storage size of 20GiB. We validated this by entering into a terminal on the container and inspecting the amount of disk space available. In this demo, we deployed a Fargate task on Amazon ECS and set the ephemeral storage size to 200 GiB based on our requirements. The result shows us that we have 200 GiB of storage available to the task, and that’s it! I will do this by running a simple df command. Now that we’re in, let’s check the disk space available to us in the container. If you aren’t familiar with ECS Exec, we recently released this feature and you can read more about it in this blog post. Once our environment is deployed, we can connect to our container in an interactive shell using ECS Exec with Copilot. At runtime, the container will simply sleep, giving us time to enter into the container to check out the storage.Īt this point, we are ready to deploy our environment and test this out! Let’s create our environment. Since we are deploying a simple demo, we will create a Dockerfile that defines how we want to package and run our application. We’ll set the size of our desired storage, and exec into the container and explore. To demo how we can set the storage for a Fargate task, we’ll deploy a container using the AWS Copilot CLI. With this latest feature, Fargate will automatically provision and manage the storage with the specified size during the lifetime of your task. Previous to this release, customers would have to choose EC2 as the compute option for their containers when running in Amazon ECS and Amazon Elastic Kubernetes Service (Amazon EKS). The need for larger storage ranges from customers who run machine learning inference, use larger Docker images (greater than 20GiB), as well as data processing with large data sets in the container. As container adoption has grown, the use cases have gone beyond simply running microservices. Tens of thousands of customers use Amazon Elastic Container Service (Amazon ECS) with AWS Fargate to benefit from the serverless compute model for a wide variety of container-based applications at scale. Today, we are announcing support in AWS Fargate to configure ephemeral storage up to 200 GiB in size.
2 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |