I would like to know at what point in time a given Cloudfront invalidation has been completed.
When browsing invalidations in AWS Console, I can only see Date created
timestamp, as per attached image.
I would like to know what is the date of completion. Couldn't find any info in the docs, also aws cli get-invalidations
api doesn't say anything about it.
Is it possible at all? Basically what im trying to achieve is to measure how much time my invalidations take, so I can assertain if this is the cause of tests failures in my project.
Cheers!
Use the Get Invalidation API call, call it repeatedly, and note down the time status switched to 'Completed'.
https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetInvalidation.html
If you're using boto3, you can use a waiter.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudfront/waiter/InvalidationCompleted.html
If you've got Enterprise support, get your TAM to submit a feature request, or a +1 on an existing feature request if one exists. (At this point (Dec 2023), I'd guess the feature request surely exists).