Request-Driven Web Service
List of all available properties for a
'Request-Driven Web Service' manifest.
Sample manifest for a frontend service
# Your service name will be used in naming your resources like log groups, App Runner services, etc. name: frontend # The "architecture" of the service you're running. type: Request-Driven Web Service http: healthcheck: path: '/_healthcheck' healthy_threshold: 3 unhealthy_threshold: 5 interval: 10s timeout: 5s alias: web.example.com # Configuration for your containers and service. image: build: ./frontend/Dockerfile port: 80 cpu: 1024 memory: 2048 variables: LOG_LEVEL: info tags: owner: frontend-team environments: test: LOG_LEVEL: debug
The name of your service.
The http section contains parameters related to the managed load balancer.
healthcheck String or Map
If you specify a string, Copilot interprets it as the path exposed in your container to handle target group health check requests. The default is "/".
http: healthcheck: '/'
http: healthcheck: path: '/' healthy_threshold: 3 unhealthy_threshold: 2 interval: 15s timeout: 10s
The destination that the health check requests are sent to.
The number of consecutive health check successes required before considering an unhealthy target healthy. The default is 3. Range: 1-20.
The number of consecutive health check failures required before considering a target unhealthy. The default is 3. Range: 1-20.
The approximate amount of time, in seconds, between health checks of an individual target. The default is 5s. Range: 1s–20s.
The amount of time, in seconds, during which no response from a target means a failed health check. The default is 2s. Range 1s-20s.
The image section contains parameters relating to the Docker build configuration and exposed port.
build String or Map
If you specify a string, Copilot interprets it as the path to your Dockerfile. It will assume that the dirname of the string you specify should be the build context. The manifest:
image: build: path/to/dockerfile
$ docker build --file path/to/dockerfile path/to
You can also specify build as a map:
image: build: dockerfile: path/to/dockerfile context: context/dir target: build-stage cache_from: - image:tag args: key: value
$ docker build --file path/to/dockerfile --target build-stage --cache-from image:tag --build-arg key=value context/dir.
You can omit fields and Copilot will do its best to understand what you mean. For example, if you specify
context but not
dockerfile, Copilot will run Docker in the context directory and assume that your Dockerfile is named "Dockerfile." If you specify
dockerfile but no
context, Copilot assumes you want to run Docker in the directory that contains
All paths are relative to your workspace root.
Only public images stored in Amazon ECR Public is available with AWS App Runner.
The port exposed in your Dockerfile. Copilot should parse this value for you from your
Operating system and architecture (formatted as
[os]/[arch]) to pass with
docker build --platform.
Key-value pairs that represent environment variables that will be passed to your service. Copilot will include a number of environment variables by default for you.
publish section allows services to publish messages to one or more SNS topics.
publish: topics: - name: order-events
In the example above, this manifest declares an SNS topic named
order-events that other worker services which are deployed to the Copilot environment can subscribe to.
Holds configuration for a single SNS topic.
Required. The name of the SNS topic. Must contain only upper and lowercase letters, numbers, hyphens, and underscores.
The environment section lets you override any value in your manifest based on the environment you're in. In the example manifest above, we're overriding the
LOG_LEVEL environment variable in our 'test' environment.