Generating presigned URLs to share objects directory bucket - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Generating presigned URLs to share objects directory bucket

The following code examples show how to generate presigned URLs to share objects from an Amazon S3 directory bucket.

The following example command shows how you can use the Amazon CLI to generate a presigned URL for an object from Amazon S3. This command generates a presigned URL for an object KEY_NAME from the directory bucket bucket-base-name--zone-id--x-s3. To run this command, replace the user input placeholders with your own information.

aws s3 presign s3://bucket-base-name--zone-id--x-s3/KEY_NAME --expires-in 7200

For more information, see presign in the Amazon CLI Command Reference.