Available in Classic and VPC
Import an object created in Ncloud Storage.Commands
The command statement is as follows:
aws s3api get-object --bucket <value> --key <value> <outfile> [--options]
Parameter
The following describes the parameters.
Parameter | Type | Required | Description | Restrictions |
---|---|---|---|---|
--bucket <value> | string | Y | Name of the bucket where the object is stored | - |
--key <value> | string | Y | Name (key value) of the object to download | - |
<outfile> | string | Y | Name of the downloaded file will be saved as | - |
--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. |
--version-id <value> | string | N | When downloading a specific version of an object in a bucket with version control enabled, specify the version ID. | - |
--range <value> | string | N | Specify the range of bytes to download. | - |
--part-number <value> | string | N | When downloading only part of an object, specify the part number to download. | - |
--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 response results. | Available options
|
--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
|
--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. | - |
--sse-customer-algorithm | string | N | User encryption algorithm (AES256) | - |
--sse-customer-key | string | N | User-provided encryption key | - |
--sse-customer-key-md5 | string | N | User-provided encryption key's MD5 value | - |
Permission
If a sub account user wants to use this command, they need the View/GetObject action permission.
Examples
This section describes an example of calling and responding to the get-object command.
Download object
Call examples
You can download an object by specifying the object to download and the name to save it as, and then calling the command. The following is a call example.
aws s3api get-object --bucket bucket-a --key img/image.png getobjecttest.png --endpoint-url=https://kr.ncloudstorage.com --key img/image.png --body image.png
Response example
The response example is as follows:
{
"AcceptRanges": "bytes",
"LastModified": "2025-03-25T00:51:18+00:00",
"ContentLength": 79238,
"ETag": "\"27447060a25da72de9ec3094a1f30cb6\"",
"VersionId": "43521fd4-0913-11f0-954d-d4f5ef94c2b0",
"ContentType": "binary/octet-stream",
"Metadata": {}
}
Related commands
Related commands are as follows: