Skip to content

Instantly share code, notes, and snippets.

@JelsB
Created April 11, 2021 16:46
Show Gist options
  • Save JelsB/96bbf17bbeaf9f601514a4c8d135ce11 to your computer and use it in GitHub Desktop.
Save JelsB/96bbf17bbeaf9f601514a4c8d135ce11 to your computer and use it in GitHub Desktop.
vpc = ec2.Vpc.from_vpc_attributes(self, 'vpc',
vpc_id=vpc_id,
availability_zones=list_of_vpc_availability_zones,
private_subnet_ids=list_of_private_subnet_ids
)
vpc_subnets = ec2.SubnetSelection(subnets=vpc.private_subnets)
# ...
alb = elbv2.ApplicationLoadBalancer(self, 'alb-name',
# ...
vpc=vpc,
vpc_subnets=vpc_subnets
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment