# Day 38: Deploying Containerized Applications with Amazon ECS

Welcome to Day 38. Today we will learn how to deploy containerized applications with Amazon ECS.

### What is AWS ECS?

**Amazon Elastic Container Service (ECS)** is a fully managed container orchestration service provided by AWS. It allows you to run, scale, and manage Docker containers without having to install or operate your own cluster management software.

### Core Concepts

* **Task Definition:** A JSON file (the "blueprint") that describes one or more containers. It specifies parameters like the Docker image to use, how much CPU/Memory is needed, and which ports should be open.
    
* **Task:** An "instance" of a Task Definition. This is the actual running container (or group of containers) on your cluster.
    
* **Service:** Manages the "desired state" of your tasks. For example, if you tell a Service to run 3 copies of a task, it will automatically restart any that crash to ensure 3 are always running.
    
* **Cluster:** A logical grouping of your tasks and services.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767424728246/46c1f466-956d-4571-8fd8-800b0ab94866.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767424782211/86694e9c-5f31-402c-bc6b-9684afd83a82.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767424829285/e9d16b04-a499-4e6f-9c1c-8659f73c7064.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767424855800/849315a3-03b5-423e-abbc-1152b5b65390.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767424873292/7bd8bd52-d485-4289-9001-ef7aa4d8d04d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425073133/ef8dc69a-c770-4246-b764-804ed25b63f0.png align="center")

```bash
cd /root/pyapp/

ls

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 198646816501.dkr.ecr.us-east-1.amazonaws.com

docker build -t xfusion-ecr .

docker tag xfusion-ecr:latest 198646816501.dkr.ecr.us-east-1.amazonaws.com/xfusion-ecr:latest

docker push 198646816501.dkr.ecr.us-east-1.amazonaws.com/xfusion-ecr:latest
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425143578/f33389b0-1aad-4c78-81df-49ed9081bb23.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425188917/577467f5-60d5-4c9a-8432-4dc3a4dfce22.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425233525/11941fd8-bfd9-44e4-a75a-d4c0d6965b9b.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425283862/bdbb1378-1900-41ff-b176-5679554cc456.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425420468/2ffda6ab-8768-41e0-825a-90e7d1c2037f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425706928/ccf94640-fadc-4041-81a3-f9fb87d7dd5c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425514372/282a11a1-a888-4749-a0c8-ecd7c4a1bcf3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425614329/94b53319-c712-49c7-8c87-ee225bafa391.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425668983/ff3656ba-3f40-4f03-8f21-2f90ec7a6514.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425751622/85a24dce-42df-4c24-86c5-bd75f4f02162.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425814427/0c43f2a5-7b9f-4cab-999e-fefe66e1e909.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425836228/e3e797be-8c9c-4737-8208-4489c63378fe.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425855227/da8a829d-91db-4aee-8881-927ac0ef9607.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425878999/93009aa1-61bd-4f14-ae18-100712b47eea.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425893776/8d194096-5aaa-4acc-848d-f3c2f7cc718a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767425961234/65308907-a7c6-42f6-b515-46d6d7be6b02.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767426055848/e8ff915e-efed-47f1-ae83-125006b09126.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767426075423/56368c6b-6da3-40e3-8035-23b8bfa4ddeb.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767426118144/88c56353-40be-44af-bda3-1f13475be229.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767426144977/a9f0b4f3-db3f-4c2e-9229-da29908599f3.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 39. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
