Tuesday 13 August 2024

AWS APP Runner

 


AWS App Runner is a fully managed service that makes it easy for developers to quickly deploy containerized web applications and APIs, at scale and with no prior infrastructure experience required

App Runner automatically builds and deploys the web application and load balances traffic with encryption. App Runner also scales up or down automatically to meet your traffic needs.

AWS console

After clicking on App runner , It will redirect you to App Runner console as shown below

App Runner console

Now click on Create an App runner service and select the repository type as below , here we have two options one is container registry and other is Source code repository

Service creation

Here I am selecting container registry and then we have two options again where you can directly give the image URI either from ECR or from ECR public , For simplicity I took an Nginx image from ECR public , You can get the image details under ECR public images under ECR console or in the url https://gallery.ecr.aws/

ECR public Gallery

Again if you are using a private ECR you need to give ECR access role , you can either create one or select one and even you have an option of selecting deployment trigger either manually or Automatic

Deployment settings & IAM role

Now if you look at the other option we have above Under Source repository is source code repository where you need to select repo and branch by creating a connection to GitHub

GitHub Connection

As of now In this Demo , as mentioned earlier I am taking nginx ECR public image and select deployment settings and click on next

Deployment trigger

Now give the service a name and select virtual cpu & memory (as of now we have less cpu and memory) and if you want to add any environment variables you can do so by adding them and then give the port number for service to access

Service settings

And now Under Autoscaling you can select either default configuration or custom configuration as per your needs, you can see what default configuration gives you.

Default Autoscaling configuration

if you want to have custom configurations, you can select that and you need to add new configuration and select values accordingly and then click on Save , Now you can select the custom one which you have created

Custom Autoscaling configuration
Custom Autoscaling configuration

But As of now As this is a simple nginx page , I am using default settings but based on your application you can change accordingly , Now under health check you can set values accordingly

Healthcheck

Under security you can specify an IAM role and KMS key

Security & Encryption

Now the last option we have here is to add tags and you can add them accordingly and then click on next

Tags

Now review all the details and then click on create & deploy as shown below

Deploy

After click on created & deploy , now it will start deploying the service and immediately you will get below screen showing operation in progress

Service Overview

Now after some time status will be changed from Operation In progress to Running you can even see the default domain that gets generated

Default Domain

Now click on the default domain , it will take you to the web page as per image you deployed , In this case it is nginx

Now if you look at the console for service Nginxdemo, we will have different tabs available as shown below

Activity

Now if you look at the logs section , you will get the event log , deployment log and application logs , In the below screenshot you can see event log you can even view them in cloud watch too

Logs

For Deployment logs , just click on deployment logs and then you can see details as below

Deployment logs

Again for Application logs you can get details by clicking on that

Application logs

Under configuration , we can see the details regarding the configurations as shown below

Configuration

And then Under metrics you can see the service metrics such as request count, HTTP 2xx/4xx/5xx response count

service metrics

And Under custom domain you can add your own domain on which you need to serve this service , You can add up to 5 domains

Custom Domains

My thoughts on this is we can use this to quick spin up the service and wanted to test your application , But as of now the limitation that I can see that is vcpu and memory given are less and hope this will change soon.