Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

408
Views
How to change file upload date in Amazon S3 using AWS CLI

I need to move some files (thousands) to Amazon S3 bucket, from where they will be displayed to the end-user by another application (instead of the current one).

Problem is, that these files have creation/upload date now (dates very between 2012 and 2017, when they were uploaded to current application), and when I move them they all start to be of the same date. That is a problem because when you look at the files in the new application, you don't understand the time hierarchy which is sometimes very important.

Is there any way I can modify upload date of a file(s) in S3?

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The Last Modification Date is generated by Amazon S3 and cannot be set via the API.

If dates and other information (eg user) are important to your application, you can store it as metadata on the object. Then, retrieve the metadata when displaying dates, user, etc.

about 4 years ago · Santiago Trujillo Report

0

What I did was renaming the file to something else and then renaming it again to its original name. As you cannot rename directly, you have to copy the file to a new name, and then copy it back to its original name. (and delete the auxiliary file, of course) It is not optimal, but that's the solution when using AWS client. I hope one day AWS will have all function the FTP used to have.

about 4 years ago · Santiago Trujillo Report

0

You can just copy over the same object and the timestamp will update. This technique is also used to prolong the expire of an object in a bucket with a lifecycle rule.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!