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  

  RSS

amrit_3327
(@amrit_3327)
Trusted Member
Joined: 9 months ago
Posts: 53
08/05/2020 5:39 pm  

Using aws cli


Quote
Topic Tags
aws
amrit_3327
(@amrit_3327)
Trusted Member
Joined: 9 months ago
Posts: 53
08/05/2020 5:40 pm  

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

 

Replace Private IP address with then desired ip range 


ReplyQuote
Share: