1 個回答
- 最新
- 最多得票
- 最多評論
0
Hi,
One way is to use the instance metadata service, but that would rely on connecting to each instance in turn. However, we know that the block device mapping can tell us if a volume is EBS-based or instance store-based. If a volume is instance store based, then the mapping will name it ephemeral[0-23]
, for example ephemeral4
. Outside of logging on to an instance, we can use the EC2 API to get the block device mappings, a little like so:
ec2 describe-instances
will return you a list of Instance IDs, which you can then pass in (using a loop, likely best) to:
ec2 describe instance-attribute --attribute block-device-mapping --instance-id $id
It shouldn't be too hard to polish that in to a nice bit of Bash etc. you can run on a loop.
相關內容
- 已提問 6 個月前
- 已提問 6 個月前
- AWS 官方已更新 9 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前