Introduction of AWS App Runner
Introduction
AWS App Runner is a service that offers a fast, simple, and cost-effective method to deploy a Github repository or a docker image as a web application in the AWS Cloud, and offers direct integration and delivery pipeline with fully managed operations, high performance, scalability, and security.
Out of the box, App Runner is built for the desired scale, so there is no requirement to re-platform or re-architect as the business grows and makes it simpler to rapidly deliver innovative solutions and business value, regardless of the language they are written in, even for teams that lack prior experience deploying and managing containers or infrastructure
How AWS App Runner Service Works?
We can define and configure your App Runner service deployments using any one of the following interfaces:
App Runner console
App Runner API
AWS Command Line Interface (AWS CLI)
AWS SDKs
Deploying from Source
Traverse to the AWS App Runner and select Create an App Runner service
Under Source related information choose Repository type, select Source code repository and then follow the instructions to connect the service to the GitHub account, post the connection provide Github repository and branch details
Click Add New button to setup the connection, add the Github connection name, and select Install another
Configure the right permission for the connection i.e all Github repository or specifically selected repositories and select Install
Now we will be back on the Create Connection console, select the account name from the drop-down under Github App and click Next
Github connection is successful, next provide the Github repository and branch details from the drop
Under Deployment Settings, select deployment trigger as Automatic, this will allow App Runner to detect any changes in the Github repo automatically, and kick off the build and deployment process. Post Deployment Settings click Next
Next configure the build. For Runtime select Python 3, currently, App Runner offers only Python and Node.js and for other environments opt for container registry workflow. Also, provide details like Build command, Start command, and Port fields, as shown here
Next, provide a name to the service, choose the CPU and memory size for the container
By default, one instance of the container image is deployed, but we can opt for advanced functionalities like autoscaling, health check, and security to ensure scalability and security for the application which are the core measures from a production point
Finally, review the configuration of the service and select Create & deploy
After a few minutes, the application will be available to access, by default App Runner secure the application by enforcing HTTPS secure traffic without explicitly handling the container image
Deploy from a Container Image
Traverse to the AWS App Runner and select Create an App Runner service
Under Source related information choose Repository type, select Container repository and choose Amazon ECR public as a provider
Under Deployment Settings, select deployment trigger as manual and select Next
Replicate the same steps as we did with the Github repository and once the application is deployed it can be accessed as shown below