Is there a way I could get the status of the aws
instance knowing only the IP Address
of the Ec2
instance?
The documentation suggests knowing the instanceId prior calling the api, but what in case I do not have the instanceId?
Sure you can:
aws ec2 describe-instances --filters Name=ip-address,Values=publicIP --output text --query 'Reservations[*].Instances[*].State.Name'
Obviously change publicIP to your real public IP Address
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.