Created
March 11, 2022 22:24
-
-
Save youngsoul/10d0b0c8a2aaefec08470505b4c909e3 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
bastion_host = ec2.Instance(self, id=f'{resource_prefix}-bastion-host', | |
instance_type=ec2.InstanceType(instance_type_identifier='t2.micro'), | |
machine_image=ec2.AmazonLinuxImage( | |
edition=ec2.AmazonLinuxEdition.STANDARD, | |
generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2, | |
virtualization=ec2.AmazonLinuxVirt.HVM, | |
storage=ec2.AmazonLinuxStorage.GENERAL_PURPOSE | |
), | |
vpc=vpc, | |
key_name='pryan-aws', # must create the key name manually first | |
vpc_subnets=ec2.SubnetSelection( | |
subnet_type=ec2.SubnetType.PUBLIC | |
), | |
security_group=bastion_sg | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment