Reputation: 5948
I'm looking for a way to add a timestamp in every file that is uploaded to an S3 bucket, Amazon-side. There is, of course, an option to do this client-side before the upload, but I don't think this is as nice and clean as it would be to have some script to run in the bucket itself everytime a new file is uploaded. I didn't find anything in the docs, though.
Upvotes: 0
Views: 3400
Reputation: 269911
There is no capability within Amazon S3 to change the Key (filename) of a file based upon upload time.
Given that your desire is to avoid name conflicts, some choices are:
Upvotes: 4
Reputation: 860
You can try with a lambda function handling the ObjectCreated event. See this tutorial.
Not sure that works though.
Upvotes: 0