Last active
January 1, 2019 05:57
-
-
Save li0nel/513410d1114b84c32822702e5cb20bb6 to your computer and use it in GitHub Desktop.
Create a bastion to access your instances in private subnets
This file contains 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
aws ec2 run-instances | |
--image-id ami-c1a6bda2 | |
--key-name laravelaws # the SSH key pair we created earlier | |
--security-group-ids sg-xxxxxxxx # our previous SG allowing access to the DB | |
--subnet-id subnet-xxxxxxxx # one of our public subnets | |
--count 1 | |
--instance-type t2.micro # the smallest instance type allowed | |
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=bastion}]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment