Amazon ECS Overview: What You Need To Know
Amazon ECS is a great choice of container hosting platforms for AWS developers, among the many available options. Jumping into an ECS deployment can be daunting, as there are multiple options and varying terminology with hard-to-predict costs. We’ll go over some of the basics of Amazon ECS, including some terminology and price considerations you’ll need to consider.
Amazon ECS 101
Amazon ECS (which stands for Elastic Container Service) lets you run Docker containers without having to manage the orchestration of those containers. With ECS, you can deploy your containers on EC2 servers or in a serverless mode, which Amazon calls Fargate. Both deployment types handle the orchestration and underlying server management for you, so you can just schedule and deploy your containers.
Amazon ECS can work for both long-running jobs and short bursts of tasks, and includes tools for adjusting the scale of the container fleet as well as the scheduling of those containers. Task placement definitions let you choose which instances get which containers, or you can let AWS manage this by spreading across all Availability Zones.
Benefits of Amazon ECS include:
- Easy integrations into other AWS services, like Load Balancers, VPCs, and IAM
- Highly scalable without having to manage the cluster masters
- Multiple management methods, including the AWS console, the AWS API, or CloudFormation templates
- Elastic Container Registry helps you manage and sort your container images
Tasks and Services and Containers (Oh My!)
Diving into the world of containers on AWS requires the use of some terminology you may not be familiar with:
- Container — An isolated environment that contains the bare minimum of services and code needed to run just a particular part of your application or microservice, designed to be run on any Docker-compatible OS.
- Task Definition — A layout of the pieces required to run your application, which can include one or more containers along with networking and system requirements.
- Task — An instantiation of a Task Definition. Multiple tasks can use the same task definition.
- Service — A layout of the boundaries and scaling options you set for your groupings of similar Tasks, which is similar to the relationship between AutoScaling Groups and EC2 Virtual Machines.
- Cluster — A collection of EC2 instances running a specialized operating system where you will run your Service.
ECS Pricing: The (Hopefully Not) Million Dollar Question
Amazon ECS pricing has a few different variables, starting with your choice of deployment methods. Since Fargate abstracts away the underlying infrastructure, you only pay for the seconds of vCPU and Memory that your Tasks are using (with a minimum of 1 minute for each Task). This pricing structure has the “serverless architecture” benefit of only paying for what you need when you need it, but also means that estimating these charges can be quite difficult.
Standard ECS pricing does not charge per-Task, but will charge based on the infrastructure you have deployed for your cluster. The cluster uses AutoScaling Groups of EC2 instances, and during setup of the cluster you can choose the instance size you want and the number of instances for the initial cluster deployment. Since the cluster can scale up and down, you have the flexibility if you get a spike in task usage, but you do need to keep an eye on underutilized or idle instances.
Containing the Containers
As you can tell, utilizing Amazon ECS containers manages a lot of the back-end work for you, but brings a whole different set of considerations for your organization. ParkMyCloud has some news coming later this year to help you manage your ECS containers! Contact us if you’d like to be notified when that’s available.
Not yet using containers, but have other AWS infrastructure? We can help control costs.
Originally published at www.parkmycloud.com on April 3, 2019.