AWS App Runner is a Platform as a Service for running containerized web applications. You provide a container image, and App Runner runs and monitors containers, distributes requests, and scales container count with load. section 18.2
Create a service with the AWS CLI by naming it and selecting a public or private AWS container registry. After several minutes, query the service until its status is RUNNING, then open the assigned service URL. Delete the service afterward to prevent unexpected charges. section 18.2
Use App Runner when simplicity matters, while accounting for its operational and cost trade-offs:
- App Runner suits small web applications and APIs when managing container infrastructure is undesirable. section 18.2
- It supports custom domains and scales containers based on request load. section 18.2
- Billing includes memory while a container is inactive, although CPU is not charged during periods without requests; the smallest example totals $25.44 monthly. section 18.2
- Simplicity has limits: App Runner has no SLA in the cited treatment, and its containers do not run inside your VPC. section 18.2 section 18.6
Listing 18.1 Creating an App Runner service
aws apprunner create-service \ #1 --service-name simple \ #2 --source-configuration '{"ImageRepository": \ {"ImageIdentifier": "public.ecr.aws/ s5r5a1t5/simple:latest", \ #3 "ImageRepositoryType": "ECR_PUBLIC"}}' #4 #1 Creates an App Runner service that will spin up containers #2 Defines a name for the service #3 Configures the source of the container image #4 Chooses a public or private container registry hosted by AWS
Shows the smallest useful AWS CLI command for creating an App Runner service from a container image. section 18.2
