navigation

Deploy applications on Amazon Elastic Container Service

ECS Lab

Amazon Elastic Container Service (ECS)

Amazon ECS is a highly scalable container service that simplifies the running, decommissioning, and management of containers in the cluster. Containers will be defined in task definitions to run single tasks or multiple tasks in a service.

AWS Elastic Container Registry (ECR)

AWS ECR is a fully managed Docker container registry service that simplifies the storage, management, and deployment of Docker container images. ECR can be integrated with Amazon Elastic Container Service (ECS) to simplify deployment flow setup for production systems and remove the complexity of repository management for container images.

Amazon ECS Task definitions

In Amazon ECS, task definitions are created to define setup parameters before launching Docker containers in Amazon ECS. The parameters that can be set in the task definition are:

  • Docker images are used.
  • The amount of CPU and memory used in the task or each container in that task.
  • How to launch (Determining the infrastructure to run)
  • Network connection method for containers.
  • Configure the log for the task.
  • The directions to handle when running the task.
  • Commands will be executed when the task is launched.
  • Define the volumes to use.
  • IAM role is used to execute the task.

Amazon ECS Services

In Amazon ECS, a Service is a configuration that allows running one or more consecutive tasks in a cluster and maintaining them automatically. Tasks and services can be run on serverless infrastructures (managed by AWS Fargate) or through your own managed infrastructure such as an EC2 cluster.

Amazon ECS Cluster

An Amazon ECS Cluster is a resource management unit used to deploy containers in AWS ECS. Once you fully define the task definitions and services for the ECS Cluster, the ECS Cluster will create the resources needed to deploy the container. An ECS cluster is a group (or one) of virtual machines containing containers.

Main content

  1. Introduction
  2. Preparation steps
  3. Create ECS Cluster
  4. Create ECS Task Definition
  5. Create AWS Target Groups
  6. Create Application Load Balancer
  7. Create CodeDeploy Role
  8. Create ECS Service
  9. Check ECS Service
  10. Resource Cleanup