presign

Prev Next

The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

Available in Classic and VPC

Create a pre-signed URL for an object uploaded to Ncloud Storage. Using a pre-signed URL allows you to download the object without additional authentication within its validity period.

Syntax

The presign syntax is as follows:

aws s3 presign \
    <s3-uri> \
    [--expires-in <expires-in>] \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running presign.

Required options

The following options are required for presign.

Options Type Required Description
<s3-uri> String Required Object's S3 URI
  • s3://{bucket_name}/{object_name} format

Optional options

These are the optional options for presign. Options that are not specified will use their default values.

Options Type Required Description
--expires-in Integer Optional Time remaining until the pre-signature URL expires (second)
  • 1-604800 (default: 3600)

Common options

For information about the options common to all aws subcommands, see Ncloud Storage options.

Examples

When you create a pre-signed URL, a URL containing the signature and expiration information is displayed.

Command

The following is an example command for creating a pre-signed URL with the default validity period.

aws s3 presign s3://my-test-bucket/img/image.png \
    --expires-in 3600 \
    --endpoint-url=https://kr.ncloudstorage.com

The following is an example command for creating a pre-signed URL with a validity period of one week.

aws s3 presign s3://my-test-bucket/img/image.png \
    --expires-in 604800 \
    --endpoint-url=https://kr.ncloudstorage.com

Output

The following is an example output of creating a pre-signed URL with the default validity period.

https://kr.ncloudstorage.com/my-test-bucket/img/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<access-key-redacted>%2F20260821%2Fkr%2Fs3%2Faws4_request&X-Amz-Date=20260821T051207Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=<signature-redacted>

The following is an example output of creating a pre-signed URL with a validity period of one week.

https://kr.ncloudstorage.com/my-test-bucket/img/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<access-key-redacted>%2F20260821%2Fkr%2Fs3%2Faws4_request&X-Amz-Date=20260821T051153Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=<signature-redacted>