Containers

Introducing AWS App Runner

Today, we’re happy to announce AWS App Runner, the simplest way to build and run your containerized web application in AWS. App Runner gives you a fully managed container-native service. There are no orchestrators to configure, build pipelines to set up, load balancers to optimize, or TLS certificates to rotate. And of course, there are no servers to manage.

App Runner provides per-second execution billing and everything you need to run secure production workloads. With a few clicks, you can have a container running with a public endpoint, verified TLS certificate, and automatic scaling.

Through App Runner, you can bring your existing containers, or use the integrated container build service to go directly from code repository to deployed application. The build service can connect to a GitHub repository to provide a git push workflow that deploys your changes automatically. For more control over the build process, App Runner works with the latest release of AWS Copilot to containerize your application and automate other AWS services, like Amazon DynamoDB.

To show some of the unique benefits of App Runner and how to get started, let’s create a service.

Deploy your first container

Let’s walk through how to deploy a sample container on App Runner. For this tutorial, we have published an example pre-built container for you here. This application gives you a basic landing page and generates a unique banner image for each service.

In the App Runner console, you can deploy the container with only three pieces of information. Start by specifying the container registry type. For this example, specify Amazon ECR Public as the provider. Enter public.ecr.aws/aws-containers/hello-app-runner:latest for the container image.

Next, name your service to anything you’d like and specify the port 8000. Optionally, you can provide configuration for your application like environment variables, health check endpoints, scaling requirements, and service tags. For our example, the defaults will work.

Click Create & Deploy and your application will deploy behind a managed load balancer with a TLS certificate. Automatic scaling is based on concurrent requests. Each service also provides CloudWatch metrics and logs for your container. You can focus on building your application while AWS handles the infrastructure.

Automatic container building

If you want to turn your code into an App Runner service without having to build or push the container, you can use a GitHub repo directly. The build service provides base containers for runtimes such as Python and Node.js so you can do less security patching. App Runner has an integrated container build service with per-minute billing for all your App Runner container needs

The example, open-source application is hosted here on GitHub. It uses the scratch disk space to generate a banner image and also exports Prometheus for the service at /metrics to show how you can use in memory cache between service requests.

To deploy it with a fully managed App Runner build pipeline, create a fork of the repository in your GitHub account. Create a new service in App Runner and select Source code repository for the type. Connect to your GitHub account and select your repository and branch.

Select Automatic as the deployment trigger type to have the container deploy automatically when you make commits to the main branch.

Specify your application runtime — Python 3 or Node.js 12. Then, specify your build command, what command starts your application, and what port will be exposed.

You can also control the build process by creating an apprunner.yaml file in your repository. The following is a minimal apprunner.yaml file for the example Python application.

version: 1.0
runtime: python3
build:
 commands:
  build:
  - yum install -y pycairo
  - pip install -r requirements.txt
run:
 command: python app.py
 network:
   port: 8000

You can view more apprunner.yaml examples in the documentation.

Once you have an apprunner.yaml file in your repo, you can directly control your container build in the repo without updating the service in the console. You push code and a new version of your container is built, pushed to a registry, and deployed. App Runner handles everything for you.

Partners in action

We have also been working with AWS Partners such as Pulumi and Logz.io to integrate their offerings with App Runner. Likewise, AWS Consulting Partners like Trek10 can help customers leverage App Runner for cloud-native architecture design.

Pulumi – “AWS App Runner is great because it is built with leading containers technology but does not require developers to have any containers expertise to run their web applications and services. We are excited to support App Runner as a resource in Pulumi.”

Logz.io – “We’re happy to announce monitoring support for AWS App Runner with our leading open source based tools Log Management compatible with ELK, Infrastructure Monitoring based on Prometheus, and Distributed Tracing based on Jaeger. By integrating Logz.io with AWS App Runner, customers can gain full visibility into the performance of their applications and infrastructure to better troubleshoot and scale their technology stacks along with saving engineering resources and time.”

Trek10 – “At Trek10, we build solutions that help our clients build and innovate faster on AWS. We are excited about AWS App Runner because of its potential to accelerate innovation by abstracting away infrastructure and simplifying web application deployment. We look forward to helping our clients leverage App Runner to build and run their cloud-native applications.”

Sysdig – “With AWS App Runner, infrastructure management is offloaded to AWS. This frees organizations to focus on developing and deploying their applications. At Sysdig, we are exploring integrations with AWS App Runner that will simplify the ability of organizations to secure and optimize their applications for an enhanced developer experience.”

We also have exciting integrations from MongoDB, Datadog, and HashiCorp which will allow App Runner customers to use the tools and services they already know and trust.

Learn more

There’s a lot more to App Runner, and we encourage you to check out the documentation and the workshop at apprunnerworkshop.com. The workshop takes you through automatic rolling updates and demonstrates examples for connecting an application to a database. You can also join our live stream on Containers from the Couch on Wednesday, May 19 at 12:00 PM PDT/3:00 PM EDT where we will walk through the workshop and take your questions.

App Runner is the latest AWS service that helps you run containers at scale. It brings years of operational experience from running billions of containers on AWS and makes it easy for anyone to get started. Let us know what features you’d like to see and share what you’re building on the public App Runner roadmap on GitHub.