Launch an EC2 Instance

Create an EC2 Instance

  1. Access the AWS Management Console
  • Find EC2
  • Select EC2

find-ec2

You need to launch an EC2 instance for our environment, then connect to this EC2 via SSH with Visual Studio Code. The EC2 instance for workspace will be set up in default VPC.

  1. In the EC2 interface
  • Select EC2
  • Select Launch instance

lauch-instance

  1. In the Application and OS Images
  • Name: cdk-workspace-ec2
  • Select Amazon Linux
  • AMI: Amazon Linux 2 AMI (HVM) Kernel 5.10, SSD Volume Type- Free tier eligble
  • Architecture: 64-bit (x86)

ec2-settings-1

  1. Select Instance type and create / select available key-pair
  • Select t3.small
  • Select a key-pair if you have a set of key-pair. If not:
    • Select Create new key pair
    • Name: my-key
    • Type: RSA
    • Private key file: .pem
    • Select Create key pair

ec2-settings-2

  1. In the Network settings
  • Leave everything else default, but:
    • Auto-assign public IP is enable
    • Allow SSH traffic from Anywhere (0.0.0.0/0)

ec2-settings-3

  1. Select Launch and wait for the result

check-ec2-launch