Skip to content

Instantly share code, notes, and snippets.

@Irio
Created November 12, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Irio/ed77e1872d94d2adba80bb002cbf0f84 to your computer and use it in GitHub Desktop.
Save Irio/ed77e1872d94d2adba80bb002cbf0f84 to your computer and use it in GitHub Desktop.
Launching a new AWS instance with internet access and public IP in a non-default VPC
  1. Create VPC1
  • Name tag: acloudguruVPC
  • IPv4 CIDR block: 10.0.0.0/16
  1. Create subnet2
  • VPC ID: (acloudguruVPC)
  • Subnet name: 10.0.1.0 - us-east-1a
  • IPv4 CIDR block: 10.0.1.0/24
  1. Create internet gateway3
  2. Attach internet gateway to VPC4
  • Available VPCs: (acloudguruVPC)
  1. Create route to internet gateway5
  • Destination: 0.0.0.0/0
  • Target: (internet gateway) igw-0b73415e2b33a7733
  1. Modify (subnet) auto-assign IP settings6
  • Auto-assign IPv4: Enable auto-assign public IPv4 address
  1. Launch instance7
  • AMI: Amazon Linux 2 AMI (HVM), SSD Volume Type - ami-0947d2ba12ee1ff75 (64-bit x86) / ami-007a607c4abd192db (64-bit Arm)
  • Instance Type: t2.micro
  • Network: (acloudguruVPC)
  • Subnet: 10.0.1.0 - us-east-1a
  • Auto-assign Public IP: Use subnet setting (Enable)
  • Security Group:
    • Name/Description: WebDMZ
    • Ports:
      • SSH (22) 0.0.0.0/0
      • HTTP (80) 0.0.0.0/0
  • Key pair: Create a new key pair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment