Practice

Launch an EC2 instance in Public subnet.

  • When creating an EC2 instance under public subnet, it automatically assigns a “public ip address”
  • Create pem file
  • chmod 400
  • ssh ec2-user@<ip-address> -i path/to/file.pem

Launch an EC2 instance in Private Subnet.

  • To connect from “public” EC2 instance to “private” EC2 instance, normally you need to allow the “traffic” by configuring a Security Group.
    • You can use the “subnet ip range” from where public EC2 instance lives. ie. 10.0.1.0/24
    • To connect from public to private EC2 instance, ssh (port 22) should be added as an inbound rule
  • IMPORTANT: so far this private EC2 instance won’t have access to internet. (for that NAT is needed)

VPC and ELB

  • dualstack means both ipv4 and ipv6 are supported.
  • internet-facing
    • load balanacers required at least 2 public subnets

Direct Connect

How do I configure a VPN over Direct Connect?

Random Notes

  • By default, how many VPCs am I allowed in each AWS region? answer: 5
  • In Amazon VPC, and instance does not retain its private IP.