Experimental
@aws-cdk/aws-apprunner-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
ImageConfiguration Struct
Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.
Example
ts
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
environmentoptional{ [key: string]: string }environmentoptionaltyping.Mapping[str, str]environmentoptionalMap<String, String>EnvironmentoptionalIDictionary<string, string>Environmentoptional*map[string]*stringdeprecated#use environmentVariables.
Default: no environment variables
environmentSecretsoptional{ [key: string]: Secret }environment_secretsoptionaltyping.Mapping[str, Secret]environmentSecretsoptionalMap<String, Secret>EnvironmentSecretsoptionalIDictionary<string, Secret>EnvironmentSecretsoptional*map[string]Secret#Environment secrets that are available to your running App Runner service.
Default: no environment secrets
environmentVariablesoptional{ [key: string]: string }environment_variablesoptionaltyping.Mapping[str, str]environmentVariablesoptionalMap<String, String>EnvironmentVariablesoptionalIDictionary<string, string>EnvironmentVariablesoptional*map[string]*string#Environment variables that are available to your running App Runner service.
Default: no environment variables
portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64= 8080#The port that your application listens to in the container.
startCommandoptionalstringstart_commandoptionalstrstartCommandoptionalStringStartCommandoptionalstringStartCommandoptional*string#An optional command that App Runner runs to start the application in the source image.
Default: no start command
If specified, this command overrides the Docker image’s default start command.