EcrPublicProps

class aws_cdk.aws_apprunner_alpha.EcrPublicProps(*, image_identifier, image_configuration=None)

Bases: object

(experimental) Properties of the image repository for Source.fromEcrPublic().

Parameters:
  • image_identifier (str) – (experimental) The ECR Public image URI.

  • image_configuration (Union[ImageConfiguration, Dict[str, Any], None]) – (experimental) The image configuration for the image from ECR Public. Default: - no image configuration will be passed. The default port will be 8080.

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_iam as iam


service = apprunner.Service(self, "Service",
    source=apprunner.Source.from_ecr_public(
        image_configuration=apprunner.ImageConfiguration(port=8000),
        image_identifier="public.ecr.aws/aws-containers/hello-app-runner:latest"
    )
)

service.add_to_role_policy(iam.PolicyStatement(
    effect=iam.Effect.ALLOW,
    actions=["s3:GetObject"],
    resources=["*"]
))

Attributes

image_configuration

(experimental) The image configuration for the image from ECR Public.

Default:
  • no image configuration will be passed. The default port will be 8080.

See:

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

Stability:

experimental

image_identifier

(experimental) The ECR Public image URI.

Stability:

experimental