Deploy a Node app to AWS ECS with Dynamic Port mapping

Ryan Dsouza

Note: There are a couple of pre-requisites required for this to work.

  1. AWS CLI to push your docker app to the AWS repository. Install it and setup your credentials using the aws configure command.
  2. Docker Community Edition for building your app image.
  3. I have used Node so node and npm is required, but you can use any backend of your choice like Python or Go and build your Docker image accordingly.

I personally love Docker. It's a beautiful way to deploy your app to production. And the best part being you can test your production app in the same environment on your local machine as well!

This picture sums it all up :)

The birth of Docker

Today I will show you how to deploy your Node app bundled in a Docker image via AWS ECS (Elastic Container Service).

Note: I recommend that you try this on a paid AWS account that you are currently using in production or in your work environment. But if you are on a free-tier, please just read this tutorial as you go because creating these services will cost you money!!!

Read More