AWS Fargate lets you run containers without managing servers or clusters. This article is a guide to deploying a simple “Hello World!” Docker Container in Amazon ECS using Fargate. The container we’ll use is available here, built using this Dockerfile. We’ll create the following ECS Objects:

We start at the ECS Console at https://console.aws.amazon.com/ecs. Click Create Cluster:

Select the Fargate template & click Next:

Enter Cluster Name, select Create VPC & click Create:

View Cluster:

Select Task Definitions on the left:

Create New Task Definition:

Select Fargate & click Next:

Add Container, enter container Name & Image & click Add:

Enter Task Definition Name & Task Size & click Create:

View Task Definition:

Select Create Service from Actions drop-down:

Select Fargate, enter Service Name & Number of Tasks & click Next:

Select VPC & Subnet & click Next:

Click Next:

Create Service:

View Service:

Click Task ID to view its details:

Note the Public IP:

Allow incoming connections to port 5000 in the security group & open IP:5000 to see the result:

(Part 3/6 in AWS series)