Creating a Pre-Signed URL
You can create 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.
When using a pre-signed URL, the user you send the URL to does not need any permission or authentication to download your object. |
A pre-sign URL is also required when copying an OUTSCALE machine image (OMI) between accounts located in different Regions. For more information, see Copying an OMI Across Regions.
Creating a Pre-Signed URL Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To create a pre-signed URL, use the presign command following this syntax:
$ 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.When using AWS CLI, the maximum duration for a pre-signed URL is 604800 seconds (1 week).
-
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The presign command returns the following element:
-
URL
: The URL at which your object is available.
https://oos.eu-west-2.outscale.com/BUCKET/OBJECT?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ABCDEFGHIJ0123456789%2F20101001%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Date=20101001T123456Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.