# ECS Fargate Steps ## Starting... Make sure you have your docker image on ECR ![](https://i.imgur.com/iiABUS4.png) ## Create a cluster - go to the ECS via services ![](https://i.imgur.com/rgQ3OnD.png) - click create cluster ![](https://i.imgur.com/8RsUC0a.png) - choose the network only template and click `next step` ![](https://i.imgur.com/zM8GfYX.png) - choose an awesome name for your cluster then click `Create` ![](https://i.imgur.com/WyXyOoT.png) - Now click `view cluster` ![](https://i.imgur.com/IbzAWsQ.png) ## Create a Task and run it - click on the `Task Definitions` on the left ![](https://i.imgur.com/rekaqtB.png) - click `create new task definition` ![](https://i.imgur.com/K6BBFVn.png) - select fargate and click`next step` ![](https://i.imgur.com/Y048fVx.png) - give your task an awesome name and select a role ![](https://i.imgur.com/UnKQKAA.png) - select a task size and `add a container` ![](https://i.imgur.com/lgHgtOo.png) - give your container an awesome name - set the image of your container from your ecr uri - set your port mapping for your container exposed port - and click `add` ![](https://i.imgur.com/MwBub0p.png) - scroll down and click `create` ![](https://i.imgur.com/BHKmIwy.png) - click on `view task defenition` ![](https://i.imgur.com/5x5QTTj.png) - click on `Actions` -> `Run Task` ![](https://i.imgur.com/V5X59pG.png) - chose fargate - select the cluster vpc - add a subnet to the the security group ![](https://i.imgur.com/7StfNlK.png) - click on `edit` for the security group ![](https://i.imgur.com/cKrpHli.png) - click on `add role` ![](https://i.imgur.com/KSDag0b.png) - choose `custom tcp` - add the port that you exposed in your container - click `save` ![](https://i.imgur.com/XzOJyBT.png) - click run task and wait for it to spin up ![](https://i.imgur.com/T5na9x4.png) ![](https://i.imgur.com/tH5CTOw.png) ## Get the ip of the task - click on the link in the task column ![](https://i.imgur.com/u9y6S5h.png) - get the public ip of your task ![](https://i.imgur.com/kpfv610.png) ## go to the public ip at the specified port that you exposed on your container ![](https://i.imgur.com/QO2TZPv.png)