AWS App Runner — for folks who like to just write code and don’t like to manage ops, and deploy in mins 😊 !!

Mani
5 min readNov 10, 2023
Auroville — Puducherry/Pondicherry —October 2023

What is AWS App Runner, and why this blog ?

Not (enough) many people seem to know AWS App Runner yet .. But in my opinion, this fully managed service from AWS is a fast, simple, and cost-effective way to deploy from source code (from either GitHub or Bitbucket) or a container image (from Amazon ECR) directly to a scalable and secure web application deployed on the AWS Cloud.

The following are some of the important features (in my opinion) of this service:

  • Automatic Scaling (!!!!) — scales applications based on traffic needs
  • Fully managed service — supports deployment from both source code and container image, and that's it !!
  • Pay as you go pricing — you only pay for the compute and memory resources used by your applications
  • Good integration with other AWS services — such as AWS WAF (web app firewall), databases, caches, and message queues, including AWS services running within your VPC.
  • A single integrated AWS console where you can manage your deployment on AWS App Runner

and much more. Please see the https://docs.aws.amazon.com/apprunner/index.html for more information

And now, the reason for this blog 😊 !! AWS App Runner is now available AWS Asia Pacific (Mumbai) region as of November 8th 2023— https://aws.amazon.com/about-aws/whats-new/2023/11/aws-app-runner-london-mumbai-paris-regions/

How do I get started?

There are plenty of blogs and workshops out there, which I have shared in the Resources section below.

Like most of you, I would rather re-use something that already exists, rather than create a new application. There is a wonderful public workshop from AWS to get started on AWS App Runner. While the workshop mentions that “it is supported only in the us-east-1 and us-east-2 region”, I was able to successfully deploy and test it in the AWS Mumbai region — ap-south-1. Just make sure, when you run the CloudFormation template either from the CLI or via the console, to run it in the Mumbai region like this:

git clone https://github.com/aws-samples/apprunner-hotel-app
cd apprunner-hotel-app/
aws cloudformation create-stack --stack-name "apprunner-hotel-stack" --template-body file://workshop-infra.yaml --capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_IAM CAPABILITY_NAMED_IAM --region ap-south-1

Just follow the instructions and you should have the sample “Hotel” app deployed in a few minutes on AWS App Runner in the AWS Mumbai region !!

Deployed hotel application running on AWS App Runner in AWS Mumbai region !!

I loved the auto-scaling of the deployed app on App runner, when we conduct a load test for around 200 concurrent users using the open source tool “hey” ..

configure the service to add an additional instance when the concurrency exceeds 50 request, and a cap of max 50 instances

Load the deployed endpoint using hey for 200 concurrent users and for 3 minutes:

hey -c 200 -z 3m https://xxxx.ap-south-1.awsapprunner.com/

and you can visualize this beautiful graph of scale-out (during load testing) and scale-in (once the load stops) !!

CloudWatch metrics of ActiveInstances in AWS App runner based on concurrent requests !!

during the peak concurrent request, App Runner has scaled to the maximum 6 instance:

CloudWatch metrics of ActiveInstances in AWS App runner based on concurrent requests at peak load !!

and after the end of the load test, its “0” instances !!

CloudWatch metrics of ActiveInstances in AWS App runner based on concurrent requests after the end of the load test!!

So, which scenarios can AWS App Runner be used? Given that it supports multiple run-times including Java, .NET 6 and others and (as of date, things may change later) we can go up-to 4 vCPU (and an increased corresponding memory):

AWS App Runner runtimes
supported configurations (this can change over time, please check documentation) — https://aws.amazon.com/apprunner/pricing/

and hence, in my opinion, App Runner can be used for many, many use-cases like, for both high volume production scenarios as well as for test/development:

  • Websites — high volume or low volume — internal or external facing
  • Exposing APIs at low latency
  • Modernization scenarios as it supports Java and .NET 6 runtimes

and many others

Adding Observability with AWS X-Ray is a breeze, and just a click on the service configuration on the AWS app runner Console.

AWS X-Ray integration with App Runner

Similarly, there are many other integrations with App Runner like protecting the deployed service with AWS WAF.

For pricing, the App Runner pricing page has some scenarios which will gives a rough estimate on your monthly costs — do check https://aws.amazon.com/apprunner/pricing/

Quick pricing examples from https://aws.amazon.com/apprunner/pricing/

That’s it folks !!

Resources

  1. AWS App runner documentation — https://docs.aws.amazon.com/apprunner/
  2. Pricing — https://aws.amazon.com/apprunner/pricing/
  3. AWS App Runner workshop — https://catalog.workshops.aws/app-runner/en-US and the associated sample app — https://github.com/aws-samples/apprunner-hotel-app
  4. AWS Serverless first workshop — https://catalog.workshops.aws/serverless-first/en-US
  5. India Innovates on AWS — twitch series recordings — https://pages.awscloud.com/india-innovates-on-aws-regi.html

I have been an advocate of a “Serverless First” approach on AWS for sometime now, and AWS App Runner in my opinion, is a great example of leveraging a fully managed service from AWS to launch your application in a few minutes whether you are a startup, a small business or an large enterprise or creating the next big thing and stop worrying about infra/ops/cost effective pricing etc.

Please ping me on LinkedIn, if you need more information to get started on AWS App Runner.

Namaskara and Happy Diwali/Deepavali 🪔 in advance !!

--

--

Mani

Principal Solutions Architect at AWS India, and I blog/post about interesting stuff that I am curious about and which is relevant to developers & customers.