Configuring a Pre-signed URL

You can configure a pre-signed URL that enables an object to be accessible through the Internet. Any user to whom you send the pre-signed URL can access the object for the time you specify.

Using a pre-signed URL, the user you send the URL to does not need any permission or authentication to download your object.

  • You can also manage your object storage resources using s3cmd commands. For more information, see s3cmd.

Configuring a Pre-signed URL Using AWS CLI

To configure a pre-signed URL, use the presign command following this syntax:

Request sample
$ aws s3 presign s3://BUCKET/OBJECT \
    --profile YOUR_PROFILE \
    --expires-in 3600 \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • s3://BUCKET/OBJECT: The path to the object you want to share in its bucket.

  • expires-in: The time left before the URL expires, in seconds.

    The maximum duration of a pre-signed URL is 604800 seconds (or 1 week).

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The presign command returns the following element:

  • URL: The URL at which your object is available.

Result sample
https://oos.<REGION>.outscale.com/<BUCKET>/<OBJECT_KEY>?AWSAccessKeyId=A1BC2DE3FGHIJ4KLM567&Expires=1493372309&Signature=dDZ%2FpIPPwfH2ITY82mZ4%2FpmZBrQ%3D

Related Page

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.