Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set the expires header on all objects in an Amazon S3 bucket all at once?

I've got about 200k images in a bucket. They all have expires headers of 2050 but I've read you shouldn't send an expires header older than a year. I want to schedule a script to run every month and set the headers to 6 months away. Anything out there? Obviously I'd like to avoid iterating 200k objects.

like image 260
Kyle West Avatar asked Nov 18 '08 16:11

Kyle West


People also ask

What happens when S3 object expires?

When an object reaches the end of its lifetime based on its lifecycle policy, Amazon S3 queues it for removal and removes it asynchronously. There might be a delay between the expiration date and the date at which Amazon S3 removes an object.

How does S3 expiration work?

S3's new Object Expiration function allows you to define rules to schedule the removal of your objects after a pre-defined time period. The rules are specified in the Lifecycle Configuration policy that you apply to a bucket. You can update this policy through the S3 API or from the AWS Management Console.

Why is my Presigned URL for an Amazon S3 bucket expiring before the expiration time that I specified?

If you created a presigned URL using a temporary token, then the URL expires when the token expires. The URL expires even if the URL was created with a later expiration time.

Does S3 support range header?

Using the Range HTTP header in a GET Object request, you can fetch a byte-range from an object, transferring only the specified portion. You can use concurrent connections to Amazon S3 to fetch different byte ranges from within the same object.


1 Answers

Disclaimer: I am the developer of this tool, but I think it may answer your question.

CloudBerry Explorer freeware will be able to do it in the next release.

like image 184
cloudberryman Avatar answered Sep 24 '22 10:09

cloudberryman