aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
72 stars 14 forks source link

EC2 DescribeStoreImageTasks API not returning expected results #601

Closed tim-finnigan closed 1 year ago

tim-finnigan commented 1 year ago

Original issue: https://github.com/boto/boto3/issues/3850

1) The bucket filter is not getting applied in this example. (It only works if ImageIds is removed)

import boto3
client = boto3.client('ec2')

response = client.describe_store_image_tasks(
    ImageIds=['ami-086c25358xxxxxx'], 
    Filters=[{"Name": "bucket", "Values": ["wrong-bucket"]}]
)

print(response)

2) When ImageIds is applied, it only returns the latest StoreImageTask result.

tim-finnigan commented 1 year ago

D97728109

tim-finnigan commented 1 year ago

We heard back from a member of the EC2 team who noted that this is not a bug. The behavior of this API is that when ImageIds are explicitly passed in, then the filters are ignored. Only when there are no ImageIds present does the API defer to the passed in filters to find the StoreImage tasks.

With that said, they agreed it is not clear from the docs that this is the behavior. They plan to consult with the doc writers to help clarify the behavior here. Thanks for bringing this to our attention!

Update - this note has been added to the API documentation:

image
github-actions[bot] commented 1 year ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.