Created
March 1, 2021 03:31
-
-
Save riponbanik/8c48bc64d4ca27869bb6d9677ad03a85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from aws_cdk import ( | |
core, | |
aws_ec2 as ec2 | |
) | |
app = core.App() | |
vpc = ec2.Vpc.from_lookup(self, | |
id="MyVPC", | |
is_default=False, | |
vpc_name='my-vpc') | |
vpc_subnets=vpc.select_subnets(subnet_type=ec2.SubnetType.PRIVATE) | |
subnet_id=vpc_subnets.subnets[0].subnet_id | |
print(subnet_id) | |
MyStack(app,my-stack) | |
app.synth() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment