ImageConfiguration

class aws_cdk.aws_apprunner.ImageConfiguration(*, environment=None, port=None, start_command=None)

Bases: object

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

Parameters:
  • environment (Optional[Mapping[str, str]]) – (experimental) Environment variables that are available to your running App Runner service. Default: - no environment variables

  • port (Union[int, float, None]) – (experimental) The port that your application listens to in the container. Default: 8080

  • start_command (Optional[str]) – (experimental) 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. Default: - no start command

See:

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

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_ecr_assets as assets


image_asset = assets.DockerImageAsset(self, "ImageAssets",
    directory=path.join(__dirname, "./docker.assets")
)
apprunner.Service(self, "Service",
    source=apprunner.Source.from_asset(
        image_configuration=apprunner.ImageConfiguration(port=8000),
        asset=image_asset
    )
)

Attributes

environment

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

Default:
  • no environment variables

Stability:

experimental

port

(experimental) The port that your application listens to in the container.

Default:

8080

Stability:

experimental

start_command

(experimental) 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.

Default:
  • no start command

Stability:

experimental