Files disappearing from Amazon S3

amazon-s3

Solution

You should enable logging on your bucket. This will tell you who/what is deleting your files.

See: Logging Amazon S3 API Calls By Using AWS CloudTrail

I found that if you have an expiry policy setup you'll also see that in the logs. See Lifecycle and Other Bucket Configurations for more info.

Problem

Here are links to four files that I uploaded in the last week, but have now disappeared from my bucket on S3: ``` https://gh-resource.s3.amazonaws.com/ghImage/SWjqzgXy9rGCYvpRF-naypyidaw.jpg https://gh-resource.s3.amazonaws.com/ghImage/SWjqzgXy9rGCYvpRF-london.jpg https://gh-resource.s3.amazonaws.com/ghImage/SWjqzgXy9rGCYvpRF-brussels.jpg https://s3.amazonaws.com/gh-resource/ghImage/SWjqzgXy9rGCYvpRF-ottawa.jpg ``` I know they successfully uploaded because I saw them on my website multiple times before they disappeared. The last file above (ottawa), I just now re-uploaded, so that I could look at the permissions and see if there was an expiry date or expiry rule. When I looked at the permissions, 'everyone' has read/download permission. Expiry date is None, expiry rule is N/A. This has been happening regularly for the last year or so. What could be causing this?

Original source