Containers and Containerization in AWS

Prathvi Kothari
3 min readSep 15, 2021

Containers are a type of operating system virtualization that allows us to run an application and its dependencies in a resource-isolated environment. They allow us to package an application’s code, configurations, and dependencies into easy-to-use building blocks that deliver environmental consistency, operational efficiency, developer productivity, and version control.

While a virtual machine, includes both a runtime system and a guest operating machine for its application, a container includes only a runtime system and instead relies on the operating system of the host. It reduces the use of memory, CPU, and storage required by the container, making it possible to support many more containers on the same infrastructure.

While Docker remains as the standard-bearer in cloud computing, many technologies such as Shifter, Spin, etc have emerged to support scientific research workloads. The leader in orchestration remains to be Kubernetes. In research computing scenarios Docker makes possible the widespread adoption of containers. As a means for distributing software, performing resource management, and providing applications for private, customized environments it popularized the idea of containers. Dockerfile produces an image, creating a container. That container can be provisioned at new sites and moved around, and executed on different platforms. This makes the building, shipping, and running of applications portable

AWS ECS:

Amazon Elastic Container Service(Amazon ECS) is an AWS Docker container service that handles the orchestration and provisioning of Docker containers that makes it easy to run, stop and manage Docker containers on a cluster.

Amazon ECS leverages serverless technology which reduces the time spent on configuration, patching, and security from AWS Fargate to deliver autonomous container operations. Amazon ECS enables you to rapidly build applications and grow your business instead of worrying about managing the control plane, add-ons, and nodes.

ECS Terminologies:

  1. ECS Cluster: It is a group of EC2 instances that has ecs-agent software available on it.
  2. Task Definition: It is a blueprint of your application that describes how a docker container should launch.
  3. Task: Lowest deployable unit in ECS in Task. The task can contain one or more containers. It refers to the running container as per task Definition.
  4. Service: Grouping of tasks is known as Service which has an endpoint like a load balancer DNS which is then called by other APIs. Service has a contract that these many numbers of tasks container need to run at a given point

When running containers on AWS, you can make two choices:

  1. Do you want to manage the server?

Choose AWS Fargate for serverless computing for containers.

Choose Amazon Elastic Compute Cloud (Amazon EC2) if you need control over the installation, configuration, and management of your computing environment.

2. Which container orchestrator do you want to use.

Amazon ECS is deeply integrated with the rest of the AWS platform capabilities and fully controlled by AWS, so we can ensure that every feature we launch works closely with ECS.

Amazon EKS is a managed Kubernetes service. You can leverage all the benefits of open-source tooling from the community as EKS runs upstream Kubernetes and is certified Kubernetes conformant. So, You can migrate any standard Kubernetes application to EKS and you wouldn’t need to refactor your code.

The container images library is named Amazon Elastic Container Registry (Amazon ECR). AWS App Mesh provides you with application-level networking. It is the only service mesh that allows communication across multiple types of computing infrastructures such as Amazon EC2, Amazon ECS, AWS Fargate, and Amazon EKS.

Conclusion: Containerization makes it easy and portable to handle applications. Using individual container building blocks, distributed applications and microservices can be more easily isolated, deployed, and scaledReferences:

https://d1.awsstatic.com/whitepapers/container-migration-methodology.pdf?did=wp_card&trk=wp_card.

https://awsreskill.com/challenges/458e56ed-5c3d-4c97-b7f3-b3454d0dd8c1/learning.

--

--