(2022.0.0) Get Public IP Address of EC2 Instance
Note: The placeholders in the code that are tagged by "<>" should be revised to match your information such as IP address, AMI ID, Instance ID, etc.
ws ec2 describe-instances --instance-ids <InstanceId> --query "Reservations[].Instances[].PublicIpAddress"
![](../../__attachments/44235502810/image23%20(1).png?inst-v=f9e056c9-f985-428d-a0ce-85f560ea1d91)
Next (Accessing Your EC2 Instance)>