Automate deploying MERN Stack on AWS App Runner with AWS Code Pipeline
A step-by-step guide with an example project
If you want to deploy your application on the managed platform by selecting the runtime, AWS App Runner is the right choice. You can run the whole API with Docker runtime without any worry about the configuration from your side. AWS App Runner is an AWS service that provides a fast, simple, and cost-effective way to deploy straight from source code or a container image directly to a scalable and secure web application in the AWS Cloud.
You can select the NodeJS runtime or you can dockerize the MERN Stack and deploy that in the Docker runtime. The Docker images can be pulled from ECR, etc. In this post, we will see end-to-end automation in which you automate deploying the MERN Stack docker image on AWS App Runner through CloudFormation and CI/CD process as well.
- Prerequisites
- Example Project
- Set up a MongoDB Atlas
- Build For Production
- Externalize Environment Variables
- Dockerize the Project
- Running the WebApp on Docker
- Creating ECR With CloudFormation
- Pushing Docker Image To ECR