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?

질문됨 일 년 전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
전문가
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠