@aws-cdk_aws-apprunner-alpha.ImageConfiguration

interface ImageConfiguration 🔹

LanguageType name
.NETAmazon.CDK.AWS.AppRunner.Alpha.ImageConfiguration
Gogithub.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#ImageConfiguration
Javasoftware.amazon.awscdk.services.apprunner.alpha.ImageConfiguration
Pythonaws_cdk.aws_apprunner_alpha.ImageConfiguration
TypeScript (source)@aws-cdk/aws-apprunner-alpha » ImageConfiguration

Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html

Example

import * as ec2 from 'aws-cdk-lib/aws-ec2';

const vpc = new ec2.Vpc(this, 'Vpc', {
  ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/16')
});

const vpcConnector = new apprunner.VpcConnector(this, 'VpcConnector', {
  vpc,
  vpcSubnets: vpc.selectSubnets({ subnetType: ec2.SubnetType.PUBLIC }),
  vpcConnectorName: 'MyVpcConnector',
});

new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromEcrPublic({
    imageConfiguration: { port: 8000 },
    imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
  }),
  vpcConnector,
});

Properties

NameTypeDescription
environment?⚠️{ [string]: string }Environment variables that are available to your running App Runner service.
environmentSecrets?🔹{ [string]: Secret }Environment secrets that are available to your running App Runner service.
environmentVariables?🔹{ [string]: string }Environment variables that are available to your running App Runner service.
port?🔹numberThe port that your application listens to in the container.
startCommand?🔹stringAn optional command that App Runner runs to start the application in the source image.

environment?⚠️

⚠️ Deprecated: use environmentVariables.

Type: { [string]: string } (optional, default: no environment variables)

Environment variables that are available to your running App Runner service.


environmentSecrets?🔹

Type: { [string]: Secret } (optional, default: no environment secrets)

Environment secrets that are available to your running App Runner service.


environmentVariables?🔹

Type: { [string]: string } (optional, default: no environment variables)

Environment variables that are available to your running App Runner service.


port?🔹

Type: number (optional, default: 8080)

The port that your application listens to in the container.


startCommand?🔹

Type: string (optional, default: no start command)

An optional command that App Runner runs to start the application in the source image.

If specified, this command overrides the Docker image’s default start command.