List public IP addresses of EC2 instances using AWS CLI
Listing all public IP addresses of EC2 instances can be completed using the --query
argument.
1
2
3
aws ec2 describe-instances \
--query "Reservations[*].Instances[*].PublicIpAddress" \
--output text
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.