AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::AppRunner::Service

CfnService

Specify an AWS App Runner service by using the `AWS::AppRunner::Service` resource in an AWS CloudFormation template. The `AWS::AppRunner::Service` resource is an AWS App Runner resource type that specifies an App Runner service.

Import

import { CfnService } from 'aws-cdk-lib/aws-apprunner';

Or use the module namespace:

import * as apprunner from 'aws-cdk-lib/aws-apprunner';
// apprunner.CfnService

Properties

Configuration passed to the constructor as CfnServiceProps.

sourceConfigurationRequired
IResolvable | SourceConfigurationProperty

The source to deploy to the App Runner service. It can be a code or an image repository.

autoScalingConfigurationArnOptional
string

The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service. If not provided, App Runner associates the latest revision of a default auto scaling configuration. Specify an ARN with a name and a revision number to associate that revision. For example: `arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/3` Specify just the name to associate the latest revision. For example: `arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability`

encryptionConfigurationOptional
IResolvable | EncryptionConfigurationProperty

An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed key .

healthCheckConfigurationOptional
IResolvable | HealthCheckConfigurationProperty

The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.

instanceConfigurationOptional
IResolvable | InstanceConfigurationProperty

The runtime configuration of instances (scaling units) of your service.

networkConfigurationOptional
IResolvable | NetworkConfigurationProperty

Configuration settings related to network traffic of the web application that the App Runner service runs.

observabilityConfigurationOptional
IResolvable | ServiceObservabilityConfigurationProperty

The observability configuration of your service.

serviceNameOptional
string

A name for the App Runner service. It must be unique across all the running App Runner services in your AWS account in the AWS Region . If you don't specify a name, CloudFormation generates a name for your service.

tagsOptional
CfnTag[]

An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter