Uploading objects with presigned URLs - 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).

Uploading objects with presigned URLs

You may use presigned URLs to allow someone to upload an object to your Amazon S3 bucket. Using a presigned URL will allow an upload without requiring another party to have Amazon security credentials or permissions. A presigned URL is limited by the permissions of the user who creates it. That is, if you receive a presigned URL to upload an object, you can upload an object only if the creator of the URL has the necessary permissions to upload that object.

When someone uses the URL to upload an object, Amazon S3 creates the object in the specified bucket. If an object with the same key that is specified in the presigned URL already exists in the bucket, Amazon S3 replaces the existing object with the uploaded object. After upload, the bucket owner will own the object.

For general information about presigned URLs, see Working with presigned URLs.

You can create a presigned URL for uploading an object without writing any code by using Amazon Explorer for Visual Studio. You can also generate a presigned URL programmatically by using the Amazon SDKs.

If you're using Visual Studio, you can generate a presigned URL without writing any code by using Amazon Explorer in the Amazon Toolkit for Visual Studio. For more information, see Using Amazon S3 from Amazon Explorer in the Amazon Toolkit for Visual Studio User Guide.

For instructions on installing Amazon Explorer, see Installing and setting up the Amazon Toolkit for Visual Studio in the Amazon Toolkit for Visual Studio User Guide.

  1. Choose a bucket in the Amazon S3 view and open the context menu (right-click).

  2. Choose Create presigned URL, and then set the expiration date and time.

  3. Choose PUT to specify that this presigned URL will be used for uploading an object.

  4. Choose the Generate button.

  5. To copy the URL to the clipboard, choose Copy.

  6. To use this URL you can send a PUT request with the curl command. Include the path to your file you specified when creating your URL and the presigned URL itself.

    curl -X PUT -T "/path/to/file" "presigned URL"

For examples of using the Amazon SDKs to generate a presigned URL for uploading an object, see Create a presigned URL for Amazon S3 by using an Amazon SDK.

When you use the Amazon SDKs to generate a presigned URL, the maximum expiration time is 7 days from the time of creation.

Note

For all Amazon Web Services Regions launched after March 20, 2019 you need to specify the endpoint-url and Amazon Web Services Region with the request. For a list of all the Amazon S3 Regions and endpoints, see Regions and Endpoints in the Amazon General Reference.