Retrieving the Bastion Public IP
The bastion host provides the only access to the VPC and its resources. Therefore, you will need to know how to connect to it through its public IP address.
To retrieve the bastion public IP address using the Web UI:
- On the View Instances page, select the bastion instance.
- On the Description tab, locate the public IP address.
- Record the bastion public IP address in the AWS worksheet.
To retrieve the bastion public IP address using the CLI:
- Run the following command:
aws ec2 describe-instances \
--instance-ids <Instance Id> | jq -r '.Reservations[].Instances[].PublicIpAddress' - Record the bastion public IP in the AWS worksheet.
Example input and output:
aws ec2 describe-instances \
--instance-ids i-06773a3ef6acd24f0 | jq -r '.Reservations[].Instances[].PublicIpAddress'
18.184.151.208