VpcConnectorProps

class aws_cdk.aws_apprunner_alpha.VpcConnectorProps(*, vpc, security_groups=None, vpc_connector_name=None, vpc_subnets=None)

Bases: object

(experimental) Properties of the AppRunner VPC Connector.

Parameters:
  • vpc (IVpc) – (experimental) The VPC for the VPC Connector.

  • security_groups (Optional[Sequence[ISecurityGroup]]) – (experimental) A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. Default: - a new security group will be created in the specified VPC

  • vpc_connector_name (Optional[str]) – (experimental) The name for the VpcConnector. Default: - a name generated by CloudFormation

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – (experimental) Where to place the VPC Connector within the VPC. Default: - Private subnets.

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

security_groups

(experimental) A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets.

Default:
  • a new security group will be created in the specified VPC

Stability:

experimental

vpc

(experimental) The VPC for the VPC Connector.

Stability:

experimental

vpc_connector_name

(experimental) The name for the VpcConnector.

Default:
  • a name generated by CloudFormation

Stability:

experimental

vpc_subnets

(experimental) Where to place the VPC Connector within the VPC.

Default:
  • Private subnets.

Stability:

experimental