[AWS CLI] Generate a presigned URL for an S3 object

Created on November 30, 2026

You can use aws s3 presign to generate a temporary download URL for an S3 object. Specify the bucket's AWS Region and use credentials that have permission to read the object.

aws s3 presign s3://example-bucket/reports/scores.txt \
    --region ap-northeast-1 --expires-in 600

The command prints an HTTPS URL with a signature in its query string. --expires-in 600 requests a lifetime of 600 seconds, or 10 minutes. Anyone with the URL can download the object while it is valid. If the signing credentials expire sooner, the URL expires with them.

AWS CLI AWS