Available in Classic and VPC
Create a pre-signed URL for an object uploaded to Ncloud Storage. Anyone can retrieve this object with an HTTP GET request using this URL.Commands
The command statement is as follows:
aws s3 presign <target> --endpoint-url <value> [--options] 
Parameter
The following describes the parameters.
| Parameter | Type | Required | Description | Restrictions | 
|---|---|---|---|---|
| --endpoint-url <value> | string | Y | Specify the default URL for command calls. | It is only available for the KR Region. See Ncloud Storage overview for call domain information. | 
| --expires-in <value> | integer | N | Time until the pre-signed URL expires (second) | The default is 3600 seconds, and it can be set up to a maximum of 604,800 seconds. | 
| --debug | boolean | N | Use debug logging. | - | 
| --no-verify-ssl | boolean | N | Redefine the default behavior for validating SSL certificates. | - | 
| --no-paginate | boolean | N | Disable automatic pagination, call only the first page for results. | - | 
| --output <value> | string | N | Specify the format of call results. | Available options - json - text - table - yaml - yaml-stream  | 
| --query <value> | string | N | JMESPath query to use for filtering response data | - | 
| --profile <value> | string | N | Use a specific profile in the credentials file. | - | 
| --region <value> | string | N | Specify the Region. | Only KR is supported. | 
| --color <value> | string | N | Set output color. | Available options - on - off - auto  | 
| --no-sign-request | boolean | N | Disable credential loading. | - | 
| --ca-bundle <value> | string | N | Specify the CA certificate to use when verifying SSL certificates. | - | 
| --cli-read-timeout <value> | int | N | Maximum read time; entering 0 changes it to a blocked status instead of a timeout. | It is set to 60 seconds by default. | 
| --cli-connect-timeout <value> | int | N | Maximum connection time; entering 0 changes it to a blocked status instead of a timeout. | It is set to 60 seconds by default. | 
| --no-cli-pager | boolean | N | Disable the CLI pager for response values. | - | 
| --cli-auto-prompt | boolean | N | Enable automatic prompting for CLI input parameters. | - | 
| --no-cli-auto-prompt | boolean | N | Disable automatic prompting for CLI input parameters. | - | 
Examples
This section describes an example of calling and responding to the presign command.
Create pre-signed URL of object stored in Ncloud Storage bucket
Call examples
If you specify the target object for which you want to create a pre-signed URL and call the command, a pre-signed URL valid for one hour will be created. The following is a call example.
aws s3 presign s3://bucket-aaa/ncs_5.png --endpoint-url=http://kr.ncloudstorage.com 
Response example
The response example is as follows:
http://kr.ncloudstorage.com/bucket-aaa/ncs_5.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE123456789%2F20241230%2Fkr%2Fs3%2Faws4_request&X-Amz-Date=20241230T125652Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=323842aee22d58d8602237c8ab6199b598b71d88b7e633397a0df8ed17342d17
Create pre-signed URL valid for one week
Call examples
You can specify the expiration period of the URL created by calling the command by setting the --expires-in option. The following is a call example.
aws s3 presign s3://bucket-aaa/ncs_5.png --endpoint-url=http://kr.ncloudstorage.com --expires-in 604800
Response example
The response example is as follows:
http://kr.ncloudstorage.com/bucket-aaa/ncs_5.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE123456789%2F20241230%2Fkr%2Fs3%2Faws4_request&X-Amz-Date=20241230T125652Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=323842aee22d58d8602237c8ab6199b598b71d88b7e633397a0df8ed17342d17