Unable to fetch list of snapshots associated with a single AMI using Boto3 SDK EC2.Client.describe_images

0

AWS Boto3 SDK EC2.Client.describe_images returns 'BlockDeviceMappings' as a key of the list of dictionaries 'Images'. 'BlockDeviceMappings' is a list of dictionaries whose one of the keys is 'SnapshotId'. The issue is 'SnapshotId' returns a single string, instead of a list of strings, which should ideally be the case, since one AMI may have multiple snapshots associated with it. Any idea, how to get the list of all the snapshots associated with a single AMI?

已提问 1 年前341 查看次数
1 回答
0

The snapshot ID displayed in "BlockDeviceMappings" is the snapshot ID used to create the AMI.
In other words, a single AMI cannot have multiple snapshot IDs associated with it.

profile picture
专家
已回答 1 年前
  • Each AMI has a block device mapping that specifies the block devices to attach to an instance when it is launched from the AMI. For an EBS-backed AMI, we can add EBS volumes and instance store volumes using a block device mapping. I am looking to fetch the list of EBS volumes based on snapshots that can be added to an AMI. Is there a way to fetch the same.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则