interface ImageConfiguration
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppRunner.Alpha.ImageConfiguration |
![]() | github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2#ImageConfiguration |
![]() | software.amazon.awscdk.services.apprunner.alpha.ImageConfiguration |
![]() | aws_cdk.aws_apprunner_alpha.ImageConfiguration |
![]() | @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.
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
Name | Type | Description |
---|---|---|
environment? | { [string]: string } | Environment variables that are available to your running App Runner service. |
environment | { [string]: Secret } | Environment secrets that are available to your running App Runner service. |
environment | { [string]: string } | Environment variables that are available to your running App Runner service. |
port? | number | The port that your application listens to in the container. |
start | string | An 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.