如何从AMI ID中找到有关EC2实例的信息? [英] How to find out information about an EC2 instance from AMI id?
本文介绍了如何从AMI ID中找到有关EC2实例的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这为我提供了有关我拥有的所有快照的信息:
This gives me information about all the snapshots I have:
aws ec2 describe-snapshots
由此,我可以提取AMI id并使用以下信息找到有关ami的更多信息:
From this, I can extract AMI id and find out more about the ami using:
aws ec2 describe-images --image-ids "ami-xxxxxxxx"
我的问题是,我们可以关联使用该ami ID的ami id和实例并找到有关它的更多信息吗?
My question is, can we relate the ami id and instance that are using that ami id and find more information about it?
推荐答案
使用image-id
aws ec2 describe-instances --filters "Name=image-id,Values=ami-xxxxxxx"
对于文本输出:
aws ec2 describe-instances --filters "Name=image-id,Values=ami-xxxxxxx" --output text
这篇关于如何从AMI ID中找到有关EC2实例的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文