Skip to content

AWS Services For Creating Docker Images

Aditya Gupta edited this page Jun 25, 2019 · 3 revisions

Amazon Elastic Container Service (ECS): https://aws.amazon.com/ecs/

Amazon Elastic Container Service (Amazon ECS) is a highly scalable, high-performance container orchestration service that supports Docker containers and allows you to easily run and scale containerized applications on AWS. Amazon ECS eliminates the need for you to install and operate your own container orchestration software, manage and scale a cluster of virtual machines, or schedule containers on those virtual machines.

AWS Fargate: https://aws.amazon.com/fargate/

Run containers without managing servers or clusters

AWS Fargate is a compute engine for Amazon ECS that allows you to run containers without having to manage servers or clusters.

Amazon ECS has two modes: Fargate launch type and EC2 launch type. With Fargate launch type, all you have to do is package your application in containers, specify the CPU and memory requirements, define networking and IAM policies, and launch the application. EC2 launch type allows you to have server-level, more granular control over the infrastructure that runs your container applications. With EC2 launch type, you can use Amazon ECS to manage a cluster of servers and schedule placement of containers on the servers. Amazon ECS keeps track of all the CPU, memory and other resources in your cluster, and also finds the best server for a container to run on based on your specified resource requirements. You are responsible for provisioning, patching, and scaling clusters of servers. You can decide which type of server to use, which applications and how many containers to run in a cluster to optimize utilization, and when you should add or remove servers from a cluster. EC2 launch type gives you more control of your server clusters and provides a broader range of customization options, which might be required to support some specific applications or possible compliance and government requirements.

Notes from the Online Training for AWS Fargate:

Deploy containers without having to manage EC2 instances and not worry bout underlying infrastructure.

Fargate makes running containers the focus of your development.

Fargate supports both Amazon ECS and Amazon EKS.

Only worry about services and apps at the container level.

Task Definition: Customer uses the task definition on how the container should run.

Fargate can be used through AWS Console, AWS CLI and Amazon ECS CLI.

**Networking in Fargate: **

  1. Tasks run in Customer VPC.

  2. ALB and NLB Support: ELB is not supported.

  3. Advanced Task Level Networking

There is cluster level isolation for your containers.

Use Amazon EC2 launch type for these cases:

  1. Heavy User For the EC2 spot and reserved instances

  2. For Microsoft/Windows Containers EC2 launch type is the best container.