Ref: https://learn.cantrill.io/courses/1820301/lectures/41301383 , https://learn.cantrill.io/courses/1820301/lectures/41301384 and https://learn.cantrill.io/courses/1820301/lectures/41301385


PART 1: Create a VPC Interface Endpoint (IE) to use Instance Connect on a private EC2 instance

  1. EC2 instance is in private subnet sn-app-A. By default we can't connect to it via Instance Connect since it doesn't have a public IP
  2. We can however use Instance Connect if we create a VPC IE in sn-app-A. That can be done from Instance Connect UI (”EC2 Instance Connect Endpoint”) or directly from VPC UI (“Endpoints”)
  3. Once endpoint is created, we can use Instance Connect to access private instance

PART 2: Create a VPC Gateway Endpoint (GWE) to access S3 privately

  1. Private instance in sn-app-A can't access public internet. It also can't access S3, which is public service
  2. Let's create a GWE for S3
  3. When endpoint is created, private instance can now access S3!
  4. Instance is still private, without internet access: ping 1.1.1.1 does NOT respond!

PART 3: Create an Egress-only IGW for a private IPv6 instance

  1. Our EC2 instance in sn-app-A has an IPv6 address, but currently the VPC has no IGWs and we can't access the internet
  2. Let's create an EIGW
  3. Now update Route Table in the main subnets of A4L-VPC
  4. Now instance can access internet with IPv6 routing:
  5. 💡 EXTRA: not covered in the original demo… can you prove that another instance in a different VPC can't ping our EC2 instance with IPv6 addressing? ;)