#90DaysOfDevOps Challenge - Day 48 - Amazon Elastic Container Service (ECS)

Cloud Engineer and DevOps enthusiast, just talking about AWS, Docker, Linux, Kubernetes, Python, and automation.
Search for a command to run...

Cloud Engineer and DevOps enthusiast, just talking about AWS, Docker, Linux, Kubernetes, Python, and automation.
No comments yet. Be the first to comment.
The #90DaysOfDevOps Challenge is a dedicated initiative aimed at promoting continuous learning and skill development in the field of DevOps over a 90-day period.
Welcome to Day 47 of the #90DaysOfDevOps Challenge. In today's session, we will put our AWS knowledge to the test and explore some hands-on exercises to deepen our understanding of AWS services. We will focus on two tasks: launching an EC2 instance a...
Running your own home lab used to mean expensive hardware, complex networking, and hours of manual configuration. This project changes that. With a single Raspberry Pi, Docker Compose, and a few hundr

Welcome to an advanced hybrid directory demo where we'll guide you through setting up a hybrid environment, connecting to simulated on-premises infrastructure, creating a managed Microsoft AD within AWS, establishing a two-way forest trust, and integ...

Hello DevOps Community! Today marks the completion of the #90DaysOfDevOps Challenge, and it's a moment to reflect on the journey we've undertaken together. Throughout this period, I've engaged with various technologies, refining my skills in the DevO...

In a modern cloud infrastructure setup, creating a robust and scalable 2-tier architecture is essential. Such an architecture helps meet the demands of your applications while ensuring repeatability, reliability, and security. In this article, we'll ...

Welcome to Part 4 of my series on building a comprehensive CI/CD pipeline in AWS. In this article, I will explore AWS CodePipeline, a powerful service for building and deploying applications in a continuous integration and continuous delivery (CI/CD)...

Welcome to Day 48 of the #90DaysOfDevOps Challenge. Today, we'll explore Amazon Elastic Container Service (ECS), a powerful container orchestration service provided by AWS. Discover what ECS is, its benefits, and how it compares to Elastic Kubernetes Service (EKS). Let's dive in!

Amazon ECS (Elastic Container Service) is a fully-managed container orchestration service provided by Amazon Web Services (AWS). It allows you to run and manage Docker containers on a cluster of virtual machines (EC2 instances) without having to worry about managing the underlying infrastructure.
With ECS, you can effortlessly deploy, manage, and scale your containerized applications using the AWS Management Console, the AWS CLI, or the API. The service supports both "Fargate" and "EC2 launch types," giving you the flexibility to run your containers on AWS-managed infrastructure or your own EC2 instances.
ECS seamlessly integrates with other AWS services, such as Elastic Load Balancing, Auto Scaling, and Amazon VPC, enabling you to build scalable and highly available applications. Moreover, ECS supports Docker Compose and Kubernetes, simplifying the adoption of existing container workflows.
In essence, Amazon ECS is a powerful and flexible container orchestration service that streamlines the deployment and management of containerized applications in AWS.
EKS (Elastic Kubernetes Service) and ECS (Elastic Container Service) are both container orchestration platforms provided by Amazon Web Services (AWS). Although both platforms enable running containerized applications in the AWS cloud, there are some notable differences between them.
Architecture: ECS follows a centralized architecture, where a control plane manages the scheduling of containers on EC2 instances. Conversely, EKS is based on a distributed architecture, with the Kubernetes control plane distributed across multiple EC2 instances.
Kubernetes Support: EKS is a fully managed Kubernetes service, natively supporting Kubernetes and allowing you to run your Kubernetes workloads on AWS without managing the Kubernetes control plane. In contrast, ECS has its own orchestration engine and does not offer native Kubernetes support.
Scaling: EKS automatically scales your Kubernetes cluster based on demand, while ECS requires you to configure scaling policies for your tasks and services.
Flexibility: EKS provides more flexibility in terms of container orchestration, allowing you to customize and configure Kubernetes to meet your specific requirements. ECS is more restrictive in terms of the options available for container orchestration.
Community: Kubernetes boasts a large and active open-source community, resulting in EKS benefiting from a wide range of community-driven development and support. ECS, on the other hand, has a smaller community and is primarily driven by AWS itself.
In summary, if you prefer using Kubernetes to manage your containerized workloads on AWS, EKS is the way to go. However, if you seek a simpler, more managed platform for running your containerized applications, ECS is an excellent choice.
Open the Amazon ECS console.
Click on "Task Definitions" in the navigation pane.
Click on the "Create new Task Definition" button. Enter a name for your task definition.
Define the container for Nginx, specifying the container image, port mappings, environment variables, and any other required configurations. The image can be found in the Amazon ECR Public Gallery

Choose the launch type compatibility (EC2 or Fargate) for your task definition and configure the task resources, such as CPU and memory limits.

Review the settings and click on the "Create" button to create the task definition.

In the Amazon ECS console, click on "Clusters" in the navigation pane.
Click on the "Create Cluster" button.
Configure the cluster settings, select the VPC and subnets for your cluster.

Review the settings and click on the "Create" button to create the cluster.

In the Amazon ECS console, select your cluster.
Click on the "Create" button next to "Services".

Configure the service settings, such as the service name, etc.

Choose the previously created task definition for your service.

Configure the network settings and security group. Ensure port 80 is open to run Nginx.

Configure Load Balancing.

Review the settings and click on the "Create Service" button to create the service.

Obtain the DNS name of the Application Load Balancer (ALB) you created.

Open a web browser and enter the ALB's DNS name.
If everything is set up correctly, you should see the default Nginx landing page or any custom content you have configured.

By following these steps, you will have successfully set up Nginx on Amazon ECS, allowing you to run and manage Nginx containers in a scalable and reliable manner.
Congratulations on completing Day 48 of the #90DaysOfDevOps Challenge. Today, we dived into Amazon Elastic Container Service (ECS) and discovered its power in orchestrating containerized applications on AWS. As we move forward to Day 49, get ready to sharpen your skills by exploring some AWS interview questions. Stay tuned!