top of page

Amazon Elastic Container Service(ECS)

Updated: Mar 7, 2024

Old tutorial blog. Deploy a Container Web App on Amazon ECS - OLD UI. Use this blog instead, for NEW UI.


Objectives:

  1. Learn To deploy a containerized application on Amazon Elastic Container Service (Amazon ECS).

  2. Learn Create the infrastructure to run your container with ECS

Step 1:

  • In AWS Management Console, go to ECS from search bar.

Step 2:

  • Here, we need to create a Cluster. Click on GET STARTED.

ree

Step 3: From Container definition select sample-app and click on Edit. Scroll down to Advanced container configuration.

ree

Step 4: Paste the following script in Command section from Environment

/bin/sh -c "echo '<html> <head> <title>Amazon ECS Sample App</title><style>body {margin-top: 40px; background-color: #333;} </style></head><body> <div style=color:white;text-align:center> <h1>Welcome toCloud-PlusPlus</h1> <h2>Congratulations! This is Amazon ECS</h2> <p>Yourapplication is now running on a container in Amazon ECS.</p></div></body></html>' >/usr/local/apache2/htdocs/index.html && httpd-foreground"

ree

Keep the rest default and scroll down and click on update.


Step 5: Select Application Load Balancer and keep rest as it is. Click on next.

ree

Step 6: Name your cluster, in this case "ECSDemo" and click next.

ree

Step 7:Review the configuration and Click on Create. Here, the cluster is getting launched. Wait till the services are complete.

Click on view services.

ree

Step 8: The Cluster is Created. Now, select Tasks and click on the first task i.e. the Container from Task status.

ree

Step 9: Here you can review the details of your Container. Scroll down to Network and copy the Public IP.

ree

Step 10: Paste the Public IP in the new window.

ree

Note: If you no longer need the Cluster, delete the Cluster. Also deregister the task from Task definition at left panel from Amazon ECS.




Was this document helpful? How can we make this document better? Please provide your insights. You can download PDF version for reference.

8 則留言


Atchaya B
Atchaya B
2024年4月10日

This blog helps to understand the concept of Amazon elastic container service.

按讚

Jothipriya
Jothipriya
2024年4月10日

Easy to follow the concept of Amazon elastic container service

按讚

Gokulnath
Gokulnath
2024年4月09日

Learnt to use the Amazon Elastic Container Service.

按讚

Yamunadevi K
Yamunadevi K
2024年4月09日

This blog makes it easier to follow the concept of Amazon Elastic Container Service.


按讚

Gokul M
Gokul M
2024年4月08日

Very easy to understand the ECS

按讚
bottom of page