As an AWS user, have you ever thought that how to run your containerized app in AWS? Well, it can be done in multiple ways but a simpler way is via the AWS App Runner service. As per AWS, you don’t need any orchestrator, load balancer, setup any build pipeline, TLS certificate, or manage any server.
Either you can bring your container image or you can use the container build service by connecting your GitHub repository. A simple architectural overview is shown below:
Let’s dive into the steps to deploy the containerized app.
Step 1: Specify Container Image Source
If you are going to link your GitHub repo, select Repository type “Source Code”, and if in case you going to use AWS ECR (Elastic Container Registry), select Repository type “Container Registry”. In this section, I am going to use public AWS ECR. I didn’t found an option to specify a public image from Docker Hub. In my opinion, AWS should consider supporting Docker Hub, as it is a popular repository to host private and public repo. After selecting Repository type, specify the link to container image as shown below and click “Next”.
Step 2: Configure Settings for your Service
Specify the name and port to be used. You can configure optional configurations as per your requirement. For this example, I am keeping them as default. Click “Next”.
Step 3: Review and Create
In this step, review your configurations and then click “Create & deploy”.
Your Application will get deployed behind a load balancer with a TLS certificate. You can check logs and once your application is in RUNNING state, you can click on the URL generated by AWS. You can also configure your custom Domain.
After reading this article you can easily deploy your containerized app using AWS App Runner. It will be great if in the future we see Docker Hub integration with App Runner. Other providers do support Docker Hub.