DEV Community

Cover image for AWS App Runner: Deploy Containerized Apps Without the Infrastructure Headache
Sameer Khanal
Sameer Khanal

Posted on

AWS App Runner: Deploy Containerized Apps Without the Infrastructure Headache

Deploying a web application into the AWS platform should not require mastering in cloud architecture. However, it is hard considering how many different aspects of AWS's VPCs, Load Balancers, Security Groups, and the like that need to be dealt with to create just one simple containerized application, none of which impact the actual code behind the application.

AWS App Runner has addressed this by offering developers a simple way to deploy their containerized Web Applications without dealing with any underlying infrastructure services for the deployment of the Web Application.

What is AWS App Runner?

App Runner by AWS offers a complete management solution for hosting and deploying web applications in containers hosted by AWS (Amazon Web Services). Point App Runner toward an image stored in Amazon ECR or source code on GitHub; App Runner will automatically deploy your application, scale your application, balance the load across multiple copies of your application, and serve your web application over HTTPS.
You won’t have to manage any servers, configure any clusters, or set up any infrastructure. Just your application running!

1. Fully Managed Infrastructure

App Runner simplifies infrastructure management as all aspects are abstracted. Configuring VPCs, choosing instance types, and managing servers are not necessary for you to do because Amazon will take care of everything for you behind the scenes.

2. Automatic Scaling

When an application experiences an increase in traffic, App Runner automatically adds instances (i.e., scales up) to meet traffic demands. Conversely, when an application experiences a decrease in traffic, App Runner will scale down by releasing nodes back into available resources (including removing all nodes from use when configured to do so).

3. Built-in HTTPS and Load Balancing

All App Runner services also have HTTPS endpoints automatically created for them, and for you. You do not need to worry about managing or renewing TLS certificates; all of this is handled automatically by Amazon for all App Runner services. Additionally, AWS will automatically load balance your services without any additional effort and expense on your part.

4. Flexible Deployment Options

In addition to deploying directly from Amazon Elastic Container Registry (ECR) or other container registries, you can deploy an Application directly from a GitHub repository connection to App Runner. When deploying an application with a source code method (from GitHub) App Runner will automatically create the container image to support the following programming languages (Python, Node.js and Java).

5. Integrated Observability

The built-in integrations with Amazon CloudWatch will automatically send your logs and metrics from the App Runner to your Amazon CloudWatch account. This gives you an easy view into your application deployments, the status of health checks and application performance without any additional work required by you.

How AWS App Runner Enhances Application Deployment

1. Eliminates Infrastructure Complexity

Developers can upload applications to production without having to learn all of the complicated AWS networks or computing setups. As a result, development teams across the organization have more options when it comes to deploying their work.

2. Reduces Time to Production

The simplified deployment process allows developers to go from writing code to being live in minutes rather than hours/days. In turn, development teams can make more iterations in a shorter amount of time, enabling them to quickly adapt to the changing needs of the organization.

3. Optimizes Costs

Developers only pay for the compute and memory that are utilized by their applications. Developers don't need to pay for development environments when they are scaling down to zero. Also, there is no additional cost associated with load balancers, etc., as these are all built into the pricing structure.

4. Simplifies Maintenance

AWS is responsible for performing platform-related tasks like platform upgrades, security patches, and infrastructure. As a result, you can focus on developing application code, while AWS manages the rest (like operational overhead).

Where App Runner Fits in the AWS

In Comparison with Amazon ECS/EKS

Amazon ECS and EKS provide significant control over a cluster's networking, task orchestration, and cluster management. On the other hand, Amazon App Runner sacrifices this control in favour of ease-of-use (there's no need to manage the underlying infrastructure).

In Comparison with Elastic Beanstalk

Both Amazon App Runner and Elastic Beanstalk are Platform-as-a-Service (PaaS) solutions, however, App Runner is newer and focuses on containers rather than on a broader application platform. App Runner also has more rigid guidelines, reducing your number of decisions and speeding up your time-to-deployment.

In Comparison with AWS Lambda

While AWS Lambda is designed to execute event-driven functions that have short execution times, Amazon App Runner is designed for long-executing, continuously running web applications and APIs that require persistent container images and the ability to communicate with users via HTTP on an ongoing basis.

Therefore, use Amazon App Runner if you are building a web application or API and would like to make the simplest deployment possible without having to worry about managing the underlying infrastructure. Otherwise, you should consider other AWS services if you require sophisticated networking configurations or custom compute requirements or workloads that extend beyond HTTP/HTTPS.

Common Use Cases

  • Web Apps: Build and launch web-based software for customers, employees, or administrators (using) Cloud Resources with no provisioning or setup required.
  • RESTful APIs: Create RESTful web services and automatically scale them based upon the number of requests received.
  • MicroServices: Build independent Components representing individual Business Feature Sets with distinct Endpoints and Scale Independently of each other based upon Business Demand.
  • SaaS Backend: SaaS Applications enable the construction of multi-tenant Applications whereby each Tenant may require their own Service Instances...
  • Prototypes: Build applications by prototyping or only those Features that validate your Idea without wasting the time spent on configuring the Software Infrastructure for an Application.

When Not to Use App Runner

App Runner is Not Designed for the Following:

  • Background Jobs / Scheduled Tasks
  • Batch Processing Workloads
  • Applications Requiring Complex VPC Configurations / Custom Networking
  • GPU Workloads / Specialized Compute Requirements
  • Multi-Region, Active-Active Deployments with Advanced Failover Strategies

In these Situations, Consider ECS, Lambda, or EC2.

Getting Started with AWS App Runner

To start using AWS App Runner:

  1. Log in to the AWS Console: Log in to your AWS account via the AWS Management Console.
  2. Navigate to App Runner: Go to Compute Services and look for App Runner.
  3. Create a Service: Select your Source Type - Container Image hosted on ECR or Source Code in GitHub.
  4. Configure the Settings: Set your Deployment Configuration (Instance Size, Scaling Parameters, etc.) and enter any Environment Variables you need for the Application.
  5. Deploy: App Runner will Build (in the case of Source Code), Deploy your Application, and Return an HTTPS Endpoint.
  6. Monitor: Use the Integrated CloudWatch to monitor Logs and Metrics generated by your application.

App Runner

Conclusion

AWS's App Runner is designed to change the way we deploy our cloud applications to the cloud. App Runner allows developers to not worry about the complexities of managing their infrastructure so they can simply focus on writing their application.

If you are deploying web applications or APIs using containers, and you want the easiest way to go from your code to production, App Runner provides you with that option. Although App Runner may not be as versatile as ECS or EKS when it comes to managing multiple services across different regions and environments, App Runner is usually a better option for more simple web application deployments.

Do you want to learn more about how AWS App Runner can improve your application's deployment process? Please leave comments below!

Top comments (0)