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 iam from 'aws-cdk-lib/aws-iam';
const service = new apprunner.Service(this, 'Service', {
source: apprunner.Source.fromEcrPublic({
imageConfiguration: { port: 8000 },
imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
}),
});
service.addToRolePolicy(new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ['s3:GetObject'],
resources: ['*'],
}))
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.