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?

gefragt vor einem Jahr341 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor einem Jahr
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen