How to Presign an S3 URL in AWS using AWS CLI

You can use the AWS CLI to presign URLs so that objects in S3 can be shared publicly even if they are set as private.

Presigned URLs are great for sharing private files in an S3 bucket

aws s3 presign s3://<bucket>/<file.jpg>
Code language: Bash (bash)

This can also be coupled with an expiry duration:

aws s3 presign s3://<bucket>/<file.jpg> --expires-in 3600
Code language: Bash (bash)

Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments