How to get the ip a...
 
Notifications
Clear all

How to get the ip address of all the server running in AWS account using aws cli


amrit_3327
(@amrit_3327)
Trusted Member
Joined: 2 years ago
Posts: 65
Topic starter  

Using aws cli


Quote
Topic Tags
aws
amrit_3327
(@amrit_3327)
Trusted Member
Joined: 2 years ago
Posts: 65
Topic starter  

aws ec2 describe-instances --query "Reservations[].Instances[]| [? NetworkInterfaces [? starts_with(PrivateIpAddress, '10.')]].{InstanceIdState.Name, IP:NetworkInterfaces[0].PrivateIpAddress}"

 

Replace Private IP address with then desired ip range 


ReplyQuote
Share: