HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/lib/python3/dist-packages/awscli/examples/s3/presign.rst
**To create a pre-signed URL with the default one hour lifetime that links to an object in an S3 bucket**

The following ``presign`` command generates a pre-signed URL for a specified bucket and key that is valid for one hour::

    aws s3 presign s3://awsexamplebucket/test2.txt

Output::

    https://awsexamplebucket.s3.amazonaws.com/test2.txt?AWSAccessKeyId=AKIAEXAMPLEACCESSKEY&Signature=EXHCcBe%EXAMPLEKnz3r8O0AgEXAMPLE&Expires=1555531131

**To create a pre-signed URL with a custom lifetime that links to an object in an S3 bucket**

The following ``presign`` command generates a pre-signed URL for a specified bucket and key that is valid for one week::

    aws s3 presign s3://awsexamplebucket/test2.txt --expires-in 604800

Output::

    https://examplebucket.s3.amazonaws.com/test2.txt?AWSAccessKeyId=AKIAEXAMPLEACCESSKEY&Signature=EXHCcBe%EXAMPLEKnz3r8O0AgEXAMPLE&Expires=1556132848

For more information, see `Share an Object with Others`_ in the *S3 Developer Guide* guide.

.. _`Share an Object with Others`: https://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html