The Amazon CloudFront documentation doesn’t mention what the “CallerReference” is for or what I should fill it with, the examples I have seen on other sites use a guid or the current date.
The AWS SDK for .NET tooltip says it’s to prevent replay attacks, but that’s what the date header is for.
The Amazon CloudFront Documentation (meanwhile?!) states that CallerReference is A unique name that ensures the request can’t be replayed indeed, see InvalidationBatch Complex Type for details:
Section Caller Reference within Object Invalidation confirms this as well and provides a hint how to handle it in practice:
Despite the sample using a time stamp as well, a dedicated value to handle replay attacks supposedly provides more flexibility and thus potentially increased security (if so desired) than relying on a date header.