Instantly Deploy Container Web Apps with AWS App Runner - Automatic Builds from Source Code and HTTPS Publishing
Learn about deploying container applications with App Runner, auto scaling, and custom domain configuration.
Overview of App Runner
App Runner is a fully managed service for deploying and running containerized web applications and APIs. While ECS requires configuring task definitions, services, and clusters, App Runner automatically handles building, deployment, scaling, and load balancing simply by specifying source code or a container image.
Deployment and Scaling
Source-based deployment connects a GitHub repository, and App Runner executes build commands (npm install && npm run build) and start commands (npm start) to automatically build the container image. Image-based deployment directly specifies an ECR container image. Auto scaling increases and decreases instances based on concurrent request count, configurable from a minimum of 1 to a maximum of 25 instances. Configuring a VPC connector enables private connectivity from App Runner instances to RDS and ElastiCache within your VPC.
VPC Connectors and Custom Domains
Configuring a VPC connector allows your App Runner service to access RDS and ElastiCache in private subnets. Only outbound traffic routes through the VPC, while inbound traffic continues to be received through App Runner's managed endpoint. Setting up a custom domain automatically issues an ACM certificate, enabling HTTPS access. Enabling X-Ray tracing in the observability settings lets you visualize request latency and errors. To broaden your knowledge of container technology, specialized books on Amazon can be a useful resource.
App Runner Pricing
App Runner charges are based on the vCPU and memory of active container instances. vCPU costs approximately $0.064 per hour, and memory costs approximately $0.007 per GB-hour. During periods of no traffic, only the memory charges for provisioned instances apply, with no vCPU charges. Set the maximum instance count for auto scaling appropriately to prevent unexpected cost increases. While the simplicity of operations is an advantage over Fargate, ECS Fargate is more suitable when fine-grained network control is required.
Summary
App Runner is a service that enables container application deployment with minimal configuration. Simply specify source code or a container image, and build, deployment, scaling, and HTTPS are automatically configured. VPC connectors provide access to RDS and ElastiCache in private subnets, allowing you to operate production environments while minimizing operational overhead.