Create EC2 Instance Connect Endpoint (Optional)

EC2 Instance Connect Endpoint

ℹ️ Overview

  • EC2 Instance Connect Endpoint (EIC Endpoint) is a secure way to connect to EC2 instances
  • It lets you access EC2 instances without a public IP or a bastion host
  • Supports both the SSH and RDP protocols
  • Launched in June 2023 as a replacement for traditional bastion hosts

💡 Key Benefits

  • Saves cost by eliminating the bastion host
  • Reduces management overhead (patching, auditing)
  • Improves security with controlled connections
  • Only data transfer is charged, there’s no extra endpoint fee

Architecture Overview

Create VPC

Deploy the EIC Endpoint

  1. Create a Security Group for the EIC Endpoint
    • Go to Security Groups in the VPC Dashboard
    • Click Create security group
    • Configure:
      • Name: Enter EIC Endpoint
      • Description: Enter Allow SSH for MyIP
      • VPC: Select ASG VPC

Create VPC Create VPC Create VPC

🔒 Configure Security Rules

  • Add an inbound rule:
    • Type: SSH
    • Source: Private subnet
  • Click Create security group

Create VPC

Create VPC

  1. Create the EC2 Instance Connect Endpoint
    • Go to VPC Endpoints
    • Click Create endpoint
    • Configure:
      • Name: EC2 private endpoint
      • Service category: Select EC2 Instance Connect Endpoint
      • VPC: Select ASG-VPC
      • Security group: Select EIC Endpoint
      • Subnet: Select Private subnet 2

Create VPC Create VPC Create VPC Create VPC

Create VPC

⚠️ Note: Wait for the endpoint status to change to Available before continuing

  1. Connect to the EC2 Private Instance
    • Select the EC2 Private instance
    • Click Connect
    • Select Connect using a Private IP
    • Select the EIC endpoint you just created
    • Click Connect

Create VPC

Create VPC

Create VPC

Note

If you can’t connect through the endpoint, you may need to add an extra rule to the Private subnet - SG.

  • Select Private subnet - SG. Click Edit inbound rule.
  • Add rule. Add type = SSH, source = Custom, and select EIC Endpoint.
  • Click Save rule

Create VPC Create VPC

🔒 Security Note If you’re not using an Admin account, make sure the user has sufficient IAM permissions to use the EIC Endpoint. See IAM permissions for EC2 Instance Connect Endpoint for details.