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

2 Posts
1 Users
0 Likes
1,297 Views
amrit_3327
(@amrit_3327)
Trusted Member
Joined: 5 years ago
Posts: 65
Topic starter  

Using aws cli


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

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: