Determining the AMI ID

Determine the AMI (Amazon Machine Image) ID used for your bastion instance. You can select an OS image and its corresponding AMI from the AWS Marketplace

Alternatively, you can find AMIs using the Amazon EC2 console. You can select from the list of AMIs when you use the launch wizard to launch an instance, or you can search through all available AMIs using the Images page. AMI IDs are unique to each AWS Region. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. (Note: This link opens an external web site.)

You can also get new image IDs by running OS-based commands:

For CentOS Linux 7, run the following command:

aws ec2 describe-images --filters "Name=name,Values=CentOS Linux 7 x86_64 HVM EBS ENA*" "Name=architecture,Values=x86_64" "Name=virtualization-type,Values=hvm" "Name=root-device-type,Values=ebs" "Name=owner-alias,Values=aws-marketplace" | jq '.Images | sort_by(.CreationDate) | [last]'

For Amazon Linux, run the following command:

aws ec2 describe-images --owners amazon --filters "Name=name,Values=amzn*gp2" "Name=virtualization-type,Values=hvm" "Name=root-device-type,Values=ebs" --query "sort_by(Images, &CreationDate)[-1].ImageId"

Record the ImageId value in the AWS worksheet.

Next Step: Selecting a Bastion Hardware Instance Type