I have this scenario:
User attempts to access file through Cloudfront
#2 and #3 are asynchronous, so it's possible that the user can attempt to access the file before it is uploaded to S3.
When I try to access the file on cloudfront, I get an Access Denied error. However, I can verify that the file exists on S3, and is accessible.
If I wait a minute or two, this access denied error is gone, and I can access my file through cloudfront. What's going on?
Eventual Consistency seems to be my problem.
All cloudfront distributions have it. The S3 Virginia region also has it.