AWS App Runner Popular2021年〜
A fully managed service for deploying and running containerized web applications and APIs
What It Does
AWS App Runner is a fully managed service that automatically builds, deploys, and scales web applications and APIs from container images or source code. Load balancers, TLS certificates, and auto-scaling are configured automatically, so you can run container apps in production without infrastructure expertise. When there's no traffic, it scales down to a minimal configuration to keep costs low.
Use Cases
App Runner is used for rapid deployment of web APIs and microservices, quick publishing of prototypes and MVPs (minimum viable products), and easy migration of existing containerized applications to AWS. It serves as a simpler alternative when ECS or EKS configuration feels too complex.
Everyday Analogy
Think of it like a food truck rental service. Opening a restaurant (app) requires finding a property, interior construction, and equipment installation (infrastructure setup). With a food truck service (App Runner), you just hand over your recipe (source code), and a truck with cooking equipment (container environment) is provided, with the number of trucks automatically adjusted based on customer volume (traffic).
What Is App Runner?
AWS App Runner is the easiest way to deploy containerized web applications. While ECS and EKS require configuring clusters, task definitions, services, and load balancers, App Runner lets you specify a container image or source code repository and have an HTTPS-enabled web app live in minutes.
Deployment Methods
App Runner offers two deployment methods. The first is specifying a container image from ECR (Elastic Container Registry), which is ideal for already-containerized apps. The second is connecting a source code repository (GitHub), where App Runner handles everything from build to deployment automatically. Both methods support automatic deployment when code is updated.
Auto Scaling
App Runner automatically scales based on the number of incoming requests. Instance count increases automatically when traffic grows and decreases when traffic drops. Setting the minimum instance count to 1 minimizes costs during periods of no traffic. Scaling configuration is simple - you just specify a concurrent request threshold. For a systematic understanding of auto scaling, specialized books on Amazon are also a useful reference.
Getting Started
In the App Runner console, click "Create service" and select either a container image or GitHub repository as the source. Choose CPU and memory sizes, specify the port number, and click "Create & deploy." Within minutes, an HTTPS-enabled URL is issued and your app is accessible. Custom domain setup is also easily done from the console.
Things to Watch Out For
- App Runner has different pricing for active and paused instances - paused instances are charged only for memory
- Accessing resources inside a VPC (RDS, ElastiCache, etc.) requires configuring a VPC connector
- WebSocket and gRPC are not supported, so consider ECS or EKS if you need these protocols