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_ec2 as ec2


vpc = ec2.Vpc(self, "Vpc",
    ip_addresses=ec2.IpAddresses.cidr("10.0.0.0/16")
)

vpc_connector = apprunner.VpcConnector(self, "VpcConnector",
    vpc=vpc,
    vpc_subnets=vpc.select_subnets(subnet_type=ec2.SubnetType.PUBLIC),
    vpc_connector_name="MyVpcConnector"
)

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"
    ),
    vpc_connector=vpc_connector
)

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