List of all available properties for a `'Request-Driven Web Service'` manifest. ???+ note "Sample AWS App Runner manifests" === "Public" ```yaml # Deploys a web service accessible at https://web.example.com. name: frontend type: Request-Driven Web Service http: healthcheck: '/_healthcheck' alias: web.example.com image: build: ./frontend/Dockerfile port: 80 cpu: 1024 memory: 2048 variables: LOG_LEVEL: info tags: owner: frontend observability: tracing: awsxray secrets: GITHUB_TOKEN: GITHUB_TOKEN DB_SECRET: secretsmanager: '${COPILOT_APPLICATION_NAME}/${COPILOT_ENVIRONMENT_NAME}/mysql' environments: test: variables: LOG_LEVEL: debug ``` === "Connected to the environment VPC" ```yaml # All egress traffic is routed though the environment VPC. name: frontend type: Request-Driven Web Service image: build: ./frontend/Dockerfile port: 8080 cpu: 1024 memory: 2048 network: vpc: placement: private ``` === "Event-driven" ```yaml # See https://aws.github.io/copilot-cli/docs/developing/publish-subscribe/ name: refunds type: Request-Driven Web Service image: build: ./refunds/Dockerfile port: 8080 http: alias: refunds.example.com cpu: 1024 memory: 2048 publish: topics: - name: 'refunds' - name: 'orders' fifo: true ``` `name` String The name of your service.
`type` String The architecture type for your service. A [Request-Driven Web Service](../concepts/services.en.md#request-driven-web-service) is an internet-facing service that is deployed on AWS App Runner.
`http` Map The http section contains parameters related to the managed load balancer. http.`private` Bool or Map Restrict incoming traffic to only your environment. Defaults to false. http.private`endpoint` String The ID of an existing VPC Endpoint to App Runner. ```yaml http: private: endpoint: vpce-12345 ``` http.`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 "/". ```yaml http: healthcheck: '/' ``` You can also specify healthcheck as a map: ```yaml http: healthcheck: path: '/' healthy_threshold: 3 unhealthy_threshold: 2 interval: 15s timeout: 10s ``` http.healthcheck.`path` String The destination that the health check requests are sent to. http.healthcheck.`healthy_threshold` Integer The number of consecutive health check successes required before considering an unhealthy target healthy. The default is 3. Range: 1-20. http.healthcheck.`unhealthy_threshold` Integer The number of consecutive health check failures required before considering a target unhealthy. The default is 3. Range: 1-20. http.healthcheck.`interval` Duration The approximate amount of time, in seconds, between health checks of an individual target. The default is 5s. Range: 1s–20s. http.healthcheck.`timeout` Duration 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. http.`alias` String Assign a friendly domain name to your request-driven web services. To learn more see [`developing/domain`](../developing/domain.en.md##request-driven-web-service).
`image` Map The image section contains parameters relating to the Docker build configuration and exposed port. image.`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: ```yaml image: build: path/to/dockerfile ``` will result in the following call to docker build: `$ docker build --file path/to/dockerfile path/to` You can also specify build as a map: ```yaml image: build: dockerfile: path/to/dockerfile context: context/dir target: build-stage cache_from: - image:tag args: key: value ``` In this case, Copilot will use the context directory you specified and convert the key-value pairs under args to --build-arg overrides. The equivalent docker build call will be: `$ 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 `dockerfile`. All paths are relative to your workspace root. image.`location` String Instead of building a container from a Dockerfile, you can specify an existing image name. Mutually exclusive with [`image.build`](#image-build). !!! note Only public images stored in [Amazon ECR Public](https://docs.aws.amazon.com/AmazonECR/latest/public/public-repositories.html) are available with AWS App Runner. image.`port` Integer The port exposed in your Dockerfile. Copilot should parse this value for you from your `EXPOSE` instruction.
`cpu` Integer Number of CPU units reserved for each instance of your service. See the [AWS App Runner docs](https://docs.aws.amazon.com/apprunner/latest/api/API_InstanceConfiguration.html#apprunner-Type-InstanceConfiguration-Cpu) for valid CPU values.
`memory` Integer Amount of memory in MiB reserved for each instance of your service. See the [AWS App Runner docs](https://docs.aws.amazon.com/apprunner/latest/api/API_InstanceConfiguration.html#apprunner-Type-InstanceConfiguration-Memory) for valid memory values.
`network` Map The `network` section contains parameters for connecting the service to AWS resources in the environment's VPC. By connecting the service to a VPC, you can use [service discovery](../developing/svc-to-svc-communication.en.md#service-discovery) to communicate with other services in your environment, or connect to a database in your VPC such as Amazon Aurora with [`storage init`](../commands/storage-init.en.md). network.`vpc` Map Subnets in the VPC to route egress traffic from the service. network.vpc.`placement` String The only valid option today is `'private'`. If you prefer the service not to be connected to a VPC, you can remove the `network` field. When the placement is `'private'`, the App Runner service routes egress traffic through the private subnets of the VPC. If you use a Copilot-generated VPC, Copilot will automatically add NAT Gateways to your environment for internet connectivity. (See [pricing](https://aws.amazon.com/vpc/pricing/).) Alternatively, when running `copilot env init`, you can import an existing VPC with NAT Gateways, or one with VPC endpoints for isolated workloads. See our [custom environment resources](../developing/custom-environment-resources.en.md) page for more. {% include 'observability.en.md' %}
`command` String Optional. Override the default command in the image.
`variables` Map 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. {% include 'secrets.en.md' %} {% include 'publish.en.md' %}
`tags` Map Key-value pairs representing AWS tags that are passed down to your AWS App Runner resources.
`count` String Specify the name of an existing autoscaling configuration. ```yaml count: high-availability/3 ```
`environments` Map 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.