2

I would like to share a file or folder in my AWS S3 bucket and set it to expire. How do I do this within the S3 console?

Eg set it to public for 7 days then revert to private

jonnyf
  • 29
  • 2

1 Answers1

1

You can get a signed url to a private bucket object with a expiry time upto one week and share it with public users. The url will expire after the expiry limit making the object restricted again.

Ashan
  • 18,898
  • 4
  • 47
  • 67
  • Agreed. Please note that this Pre-Signed URL is for one object only. It is not possible to share a 'folder' via this method. – John Rotenstein Jun 11 '17 at 11:59
  • thanks guys, how do I do this within the S3 console? – jonnyf Jun 11 '17 at 20:07
  • You can't in the console but here is an example in Java Or with the CLI http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURLJavaSDK.html . http://docs.aws.amazon.com/cli/latest/reference/s3/presign.html – strongjz Jun 12 '17 at 01:06