AWS App Runner: Easy Serverless Web Application Deployments

Last Updated on

CraftyTechie is reader-supported. When you buy through links on our site, we may earn an affiliate commission.

Are you looking for container hosting with AWS App Runner?

This article continues our series on hosting PHP web applications on AWS. You can see our full list of AWS cloud hosting options for PHP. We will be reviewing App Runner today.

AWS App Hosting Services

ServiceServerlessContainerized DeploymentsEase of ManagementAutomated Deployment
AWS App RunnerYesYesHighYes
AWS LambdaYesYesHighWith Amplify
AWS Elastic BeanstalkNoYesMediumYes
AWS EC2NoNoLowwith beanstalk
AWS Elastic Container Service (ECS) with FargateYesYesHighNo
AWS Elastic Kubernetes Service (EKS) with FargateYesYesLowNo
AWS AmplifyPartiallyYesHighYes

What is AWS App Runner

App Runner is a new AWS service offered to compete with the platform services such as Heroku, GCP Cloud Run, and Azure Container Apps.  It’s used to deploy a containerized web application to the cloud in minutes with built-in auto-scaling, load balancing, monitoring, secrets management, and more.

Article Highlights

  • Introduction to AWS App Runner: AWS App Runner is a fully managed service for deploying and scaling containerized applications without the need for manual infrastructure management.
  • Serverless and Containerized: App Runner provides serverless computing capabilities, enabling you to deploy containerized applications without provisioning or managing servers.
  • Ease of Deployment: App Runner supports seamless deployment from GitHub source repositories or Elastic Container Registry (ECR) images, simplifying the deployment process for developers.
  • Automatic Scaling: App Runner automatically scales your application based on incoming traffic and pre-defined conditions, ensuring your application remains performant under varying loads.
  • Integration with AWS Services: App Runner integrates with other AWS services such as AWS Copilot, AWS CloudWatch, and AWS Parameter Store, providing a cohesive ecosystem for application management.
  • Pricing and Cost Estimates: App Runner’s pricing is based on vCPU and memory usage, making it cost-effective for applications with varying resource requirements. The article provides cost estimates for different monthly request volumes.
  • Use Cases and Alternatives: The article discusses when to choose App Runner and when to consider alternatives like AWS Lambda, Elastic Beanstalk, ECS, EKS, or Amplify, depending on your specific requirements.
  • Comparison with Competitors: The article includes a comparison table between AWS App Runner and other popular services such as Google Cloud Run, Azure App Service, and Heroku, showcasing the key differences and similarities.
AWS App Runner Cloud Hosting Review

Free AWS Development Guide

Stop running in circles and develop your applications faster and cheaper in AWS. This guide will walk you through ways to maximize AWS to generate real value for your needs. We pick the right services to scale, tighten security and maximize costs.

Download our free guide now and get started with confidence.

I love App Runner for standard Web Application Projects

Web app developers can finally deploy and host their apps on AWS with fewer infrastructure headaches, configurations, and more. This allows you to allocate your resources to invest better in the product, customers, and business.

I have been waiting for a service like this from AWS for a long time. There just is little business value when worrying about underlying infrastructure requirements such as load-balancing, autoscaling, VPCs, and networking.

Especially as a startup. You need to be agile and deliver quickly without accruing high costs which AWS hadn’t really ever done well unless you built your app their way on Amplify.

Which also meant usually learning a whole new programming paradigm that didn’t make sense to do.

AWS App Runner Pricing for Hosting

You only pay for actively used CPU resources at $0.064 / hr per CPU and all provisioned ram usage at $0.007 / hr. This translates into approximately $18-24 a month for a small startup Laravel web app that uses 2 CPUs & 3 GB of RAM actively at 8-10 hours a day.

  • Active CPU usage: $0.064 / hr / CPU
  • provisioned RAM: $0.007 / hr / GB
  • 10k requests / month Laravel app: $18-30 / month
  • 100k requests / month Laravel app: $200-$310 / month
  • 1M Requests / month Laravel app: $716 / month

Does App Runner offer a Free Tier

No. AWS does not technically offer a completely free tier for App Runner but does allow you to get very close because of its performance pricing. Most brand-new startups testing MVPs and proof of concepts get very minimal traffic with 2-3 hours max a day which should only equal to $5-10 per month.

AWS App Runner is a powerful balance between affordability and security. It’s an easy-to-use orchestration service that runs your applications on a production scale, allowing you to save time and money. AWS App Runner covers the cost of provisioning, monitoring, scaling, and supporting your apps. The pricing is based on the resource utilization of each application over CPU, RAM and execution time — enabling you to get reliable performance at a low cost. As an added bonus, when your app Spike’s usage it can scale up so you don’t have to worry about managing an unexpected increase in demand.

AWS App Runner Alternatives

You can find App Runner alternatives on AWS & other cloud providers. The most closely related services on AWS are Elastic Beanstalk and Elastic Container Services. Google Cloud Run, Heroku Dynos, and Azure App services are the competitive offerings on other cloud providers

FeatureAWS App RunnerHerokuGoogle Cloud RunAzure App Services
DeploymentCode-based & ContainersGit-based & ContainersContainer-basedCode-based & Containers
Supported LanguagesAny (via Containers)MultipleAny (via Containers)Multiple
AutoscalingYesYes (with limitations)YesYes
Custom DomainsYesYesYesYes
SSL/TLS SupportYesYesYesYes
Continuous DeploymentYesYesYesYes
Load BalancingBuilt-inAdd-onBuilt-inBuilt-in
Infrastructure ManagementFully managedFully managedFully managedFully managed
Integration with Other ServicesAWS servicesHeroku Add-onsGoogle Cloud servicesAzure services
Pricing ModelPay-as-you-goFree tier + pay-as-you-goFree tier + pay-as-you-goFree tier + pay-as-you-go
Monitoring & LoggingAWS CloudWatchHeroku DashboardGoogle Cloud MonitoringAzure Monitor
Container Orchestration (Optional)ECSN/AGKEAKS

AWS App Runner vs Heroku

Heroku is an excellent comparison for AWS App Runner as both are powerful tools for deploying and running web application containers without worrying about infrastructure. Heroku is a much more mature and feature-rich service but I still recommend App Runner. The total cost will be significantly lower and you will be able to take advantage of the full suite of services that AWS offers. Heroku just cannot compete with the AWS juggernaut.

Price Comparison of AWS App Runner vs Heroku Dynos

  • Heroku uses a pricing model based on dynos, which are the containers that run your application. Prices start at $25 per month for the hobby dyno, which includes 512 MB of memory and 1x CPU, and go up to $500 per month for the performance-l dyno, which includes 14 GB of memory and 4x CPU.
  • Heroku offers a free hobby dyno for basic application hosting. This includes 512 MB of memory and 1x CPU, as well as basic monitoring and logging features. AWS App Runner does not currently offer a free tier.
  • The cost of 1 million requests will depend on a variety of factors, such as the size and complexity of your application, as well as the resources you have allocated to it. However, as a rough estimate, 1 million requests could cost you between $100 and $1000 with AWS App Runner, and between $250 and $2500 with Heroku.

Why Choose Heroku over App Runner

  • The Heroku platform as a service is much more mature and feature-rich
  • Heroku offers a complete free-tier for your container apps

Why Choose AWS App Runner Over Heroku to Host My Container App

  • Significantly cheaper total lifetime cost. Heroku costs are notoriously high as you grow in any significant traffic.
  • No future required app migrations. Due to the service and cost constraints, You will likely need to migrate away from Heroku eventually
  • Integrates seamlessly with AWS services such as S3, RDS, Cognito, and more

AWS App Runner vs Google Cloud Run for Container App Hosting

Choosing between the App Runner service or Google Cloud Run for deploying your Docker container apps is difficult because they are comparable services. When choosing, the deciding factor won’t be on this service but on the auxiliary cloud services.

Both services scale well, are easy to use, and are relatively priced the same. Select the service based on your cloud preference.

We’ve written a full comparison article between the 2 services. Click here to see the app runner services and cloud run containerized web applications article

Price Comparison

  • GCP Cloud Run uses a pricing model based on the number of CPU and memory resources you allocate to your application. Prices start at $0.40 per vCPU per hour for the smallest configuration and go up to $2.40 per vCPU per hour for the largest configuration.
  • GCP Cloud Run offers a free tier for new users, including 2 million invocations and 400 vCPU-seconds per month. AWS App Runner does not currently offer a free tier.
  • The cost of 1 million requests will depend on various factors, such as the size and complexity of your application and the resources you have allocated to it. However, as a rough estimate, 1 million requests could cost you between $400 and $2400 with GCP Cloud Run .

Choosing GCP Cloud Run Over AWS App Runner services

  • Integrate with other Google Cloud services. If you prefer or already using GCP services such as Cloud Pub/Sub and Cloud Firestore then it makes sense.
  • GCP Cloud Run offers a free tier for new users, including 2 million invocations and 400 vCPU-seconds monthly. This can be a great option for developers who are just getting started or for testing purposes.

AWS App Runner Service vs Azure Containers

Azure Container Apps & AWS App Runner are comparable services, but we prefer Azure for container applications. Azure is much more mature and feature-rich. You get more customization in container image applications for autoscaling, sizes, integrations, etc and your costs can be much lower in Azure at the moment.

We’ve written a related in-depth comparison article. Click here to read our App Runner vs Azure App Services article

Choosing Azure Containers over AWS App Runner

Azure Containers integrates with other Azure services, such as Azure Kubernetes Service (AKS) and Azure Functions, which can be helpful if you already use these services in your application.

Backed by Microsoft. Microsoft is one of the most mature and successful software companies in the world at this point. They have a strong track record of support and delivering value for services.

Capabilities and Customization. AWS App Runner is a little lackluster in terms of customization compared to Azure Containers. You have many options and configurations to help with autoscaling, integrations, and more in Azure Containers that you do not get with App Runner service.

How do I deploy AWS App Runner?

To deploy AWS App Runner, you need to create a service, provide the source code (GitHub repository or Elastic Container Registry), and configure settings like instance size and scaling. App Runner automatically builds, deploys, and scales your containerized applications, offering continuous deployment for streamlined updates.

app runner continuous deployment

To deploy AWS App Runner, follow these steps:

  1. Sign in to the AWS Management Console and navigate to the App Runner console.
  2. Click “Create service” to start the process.
  3. Choose a source for your application, either a GitHub repository or an Amazon Elastic Container Registry (ECR) image.
  4. If using GitHub, connect your GitHub account and select the desired code repository and branch.
  5. If using ECR, select the image repository and tag.
  6. Configure build settings if necessary, such as specifying a Dockerfile or build commands.
  7. Choose an instance size for your service, specifying the number of vCPUs and memory.
  8. Configure the scaling options, such as the minimum and maximum number of instances and the desired concurrency.
  9. Optionally, configure custom domains, environment variables, or IAM role for your service.
  10. Review the settings and click “Create” to deploy your service.

App Runner will automatically build, deploy, and scale your containerized applications, providing continuous deployment for streamlined updates.

Is AWS App Runner serverless?

Yes, App Runner is part of Amazon’s serverless architectures, as it uses Amazon ECS and AWS Fargate to manage and scale containerized applications. This enables a seamless experience for developers, allowing them to focus on building applications without worrying about infrastructure management.

What is the difference between App Runner & Elastic Beanstalk?

App Runner is designed for containerized applications and provides a simple deployment experience, while Elastic Beanstalk supports a wider range of applications and offers more control over infrastructure. Elastic Beanstalk can deploy applications in multiple languages, such as Java, .NET, PHP, Node.js, Python, Ruby, and Go, whereas App Runner focuses on containerized applications.

Check out our in-depth comparison article on the topic of App Runner vs Elastic Beanstalk here.

How to add a custom domain to App Runner?

To add a custom domain to App Runner, you need to register the domain, configure the DNS settings in Route 53 or your domain providate, and associate the domain with your App Runner service using the App Runner console or AWS CLI. This enables your application to be publicly accessible via the custom domain.

Adding a custom domain to App Runner involves these steps:

  1. Register the domain using a domain registrar or AWS Route 53.
  2. Configure the DNS settings for your domain, pointing it to the appropriate App Runner service endpoint using a CNAME record in Route 53.
  3. In the App Runner console, navigate to your service and click “Custom domains” in the navigation pane.
  4. Click “Add domain” and enter the custom domain you’ve registered.
  5. Follow the instructions to create a certificate for the custom domain using AWS Certificate Manager.
  6. After the certificate is issued, associate it with your App Runner service and verify the domain ownership.

Can you use App Runner if your application is not containerized?

Yes, you can use App Runner even if your application is not containerized. AWS App Runner can automatically containerize your application during the deployment process through custom language runtimes. This eliminates the need for prior containerization.

App Runner Language Runtimes Supported

  • .NET
  • Go
  • Java
  • Node
  • PHP
  • Python
  • Ruby

You can see the full list of available language version runtimes here.

How do I deploy a container to AWS App Runner?

You can deploy a container to AWS App Runner by specifying the container image source from either a private or public Amazon Elastic Container Registry (ECR). App Runner will then handle the deployment and scaling of your containerized application.

You can only automatically deploy images from private elastic container registries. You must manually deploy any public registries.

Which sources can be specified with App Runner?

With App Runner, you can specify either a GitHub source repository or Private / Public Amazon Elastic Container Registry (ECR) as the source for your containerized application. This flexibility allows for seamless integration with your existing development workflows.

  • Github Source Code Repository
  • Private or Public Elastic Container Registry

Does App Runner integrate with CloudWatch?

Yes, App Runner integrates with Amazon CloudWatch, enabling you to monitor application performance and access logs. This provides insights into your application’s behavior and helps identify potential issues.

Can you use Copilot with App Runner?

Yes, you can use AWS Copilot with App Runner. Copilot is a command-line interface (CLI) tool that simplifies the deployment of containerized services on AWS, making it easier to manage and scale applications using App Runner.

How to Setup Copilot with App Runner

  1. Install AWS Copilot: Ensure you have the AWS Copilot CLI installed on your local machine. If you don’t have it installed, follow the installation instructions on the official AWS Copilot page.
  2. Configure AWS CLI: Make sure you have the AWS CLI configured with the appropriate credentials and region. If you haven’t, follow the official AWS CLI configuration guide.
  3. Initialize the application: In your project directory, run the copilot init command to create a new Copilot application. Follow the prompts to select the type of service (App Runner) and the source code repository (GitHub) or the Elastic Container Registry image.
  4. Configure the service: AWS Copilot will create a manifest.yml file in the copilot/ folder. This file contains the configuration for your App Runner service. Modify this file as needed to set environment variables, desired count, resources, and other configurations.
  5. Deploy the service: Deploy your App Runner service by running the copilot svc deploy command. This will package your source code or use the specified Elastic Container Registry image, and deploy the service on App Runner.
  6. Monitor the service: You can monitor the status and logs of your App Runner service by running the copilot svc status and copilot svc logs commands.
  7. Update the service: To update your service, make changes to your source code or manifest.yml file, and then run copilot svc deploy again. AWS Copilot will build and deploy a new version of your service.
  8. Delete the service: If you want to delete your App Runner service, run the copilot svc delete command.

Can you scale App Runner to 0

No, you cannot currently scale the active container instances in App Runner service to 0. You must maintain 1 provisioned instance at this time. But, it is important to know that provisioned instances are priced much lower than active instances.

Provisioned instances do help with warm-up time & concurrent requests. There is a current request in the roadmap to scale to 0

Deploy Your Laravel PHP App into AWS App Runner

Deploying your Laravel containerized web applications into Amazon Web Services App Runner couldn’t be easier. You can use the intuitive interface to easily set up your Laravel application and ensure it is running securely and reliably in no time at all.

With complete control of settings through AWS Console, you have the ability to fine-tune the performance and scalability of your Laravel app with just a few clicks. Whether you are a novice or an experienced Laravel engineer, deploying with AWS App Runner gives you the power to launch within minutes and experience world-class deployment speed and quality.

Using App Runner services

App Runner is an excellent service to run containerized web applications. It is especially ideal for small or startup development teams who really want to take advantage of all the services and power of AWS without the infrastructure headache. You can run automatic deployments through source code or container registries.

It is a really good service to get your app up and working. It provides really good automatic scaling solutions and allows you to switch to the more powerful services as you grow since it’s built on Elastic Container Service.

Would I recommend it over other cloud and platform service offerings such as Heroku, GCP App Runner, or Azure App Service to deploy web applications and apis?

It depends.

if you want to use other AWS services then it is an excellent service. It is also more affordable than Heroku. But, I wouldn’t switch from Google Cloud or Azure to it.

Azure, GCP and Heroku all lead AWS App Runner in maturity and features. AWS is putting a lot of resources into the service but it still lacks much of the configuration and features that the other environments provide out of the box. It does have some catching up to do.

On the other hand, It does excel at what it claims to do and what AWS has lacked for a very long time. AWS has many additional really great services that developers use but currently host elsewhere because of a lack of a simple app hosting service. If you enjoy AWS services but really hate the annoying configurations and infrastructure complexity then App Runner will be a great resource for you.

Free AWS Development Guide

Stop running in circles and develop your applications faster and cheaper in AWS. This guide will walk you through ways to maximize AWS to generate real value for your needs. We pick the right services to scale, tighten security and maximize costs.

Download our free guide now and get started with confidence.

Building Web Applications in AWS

This article is part of our series to make AWS easy. We love AWS, but let’s be honest. It isn’t effortless. It’s way too complicated. We’ve created this learning path to help level you up and onboard your PHP app quickly.

Did you find this article helpful?

Join the best weekly newsletter where I deliver content on building better web applications. I curate the best tips, strategies, news & resources to help you develop highly-scalable and results-driven applications.

Build Better Web Apps

I hope you're enjoying this article.

Get the best content on building better web apps delivered to you.