I'm trying to get a list of the images older than x date. As per the AWS doc, I'm using the YYYY-MM-DDThh:mm:ss.sssZ
format.
Here is my code:
DescribeImagesResponse describeImagesResponse = _ec2Client.DescribeImages(new DescribeImagesRequest
{
Filters = new List<Filter> { new Filter("creation-date", new List<string> { "2021-09-29T*" }) },
Owners = new List<string> { "self" }
});
return describeImagesResponse.Images;
The DescribeImagesRequest
returns a list of 106 images without the filter, all being created from 2019 to 2022, so I was expecting a list of about 50 images or so.
Instead, I get an empty list.
How can I get all images older than a specific date?