Available in Classic and VPC
Get an object stored in a Ncloud Storage bucket.
For a Sub Account user to execute this command, they must have View/GetObject action permissions.
Syntax
The get-object syntax is as follows:
aws s3api get-object \
--bucket <bucket> \
--key <key> \
<outfile> \
[--version-id <version-id>] \
[--range <range>] \
[--part-number <part-number>] \
[--sse-customer-algorithm <sse-customer-algorithm>] \
[--sse-customer-key <sse-customer-key>] \
[--sse-customer-key-md5 <sse-customer-key-md5>] \
--endpoint-url <endpoint-url>
When you query an object for which object lock retention or legal hold has been set, the ObjectLockMode, ObjectLockRetainUntilDate, and ObjectLockLegalHoldStatus fields are returned.
Options
This section describes the options available when running get-object.
Required options
The following options are required for get-object.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name |
--key |
String | Required | Object name |
<outfile> |
String | Required | Name of the downloaded file will be saved as |
Optional options
These are the optional options for get-object. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--version-id |
String | Optional | Object version ID
|
--range |
String | Optional | Byte range to download |
--part-number |
String | Optional | Part number to download
|
--sse-customer-algorithm |
String | Optional | User encryption algorithm (AES256) |
--sse-customer-key |
String | Optional | User-provided encryption key |
--sse-customer-key-md5 |
String | Optional | User-provided encryption key's MD5 value |
Common options
For information about the options common to all aws subcommands, see Ncloud Storage options.
Examples
If the request to download an object is successful, the object is saved to the specified path, and the object's metadata is returned.
Command
The command example is as follows:
aws s3api get-object --bucket my-test-bucket \
--key img/image.png \
--endpoint-url=https://kr.ncloudstorage.com \
image.png
Output
The output example is as follows:
{
"AcceptRanges": "bytes",
"LastModified": "Fri, 04 Sep 2026 06:19:10 GMT",
"ContentLength": 40960,
"ETag": "\"7cb4883d8f0eede455af0738a2d83b4b\"",
"ChecksumCRC32": "35sEXg==",
"ChecksumType": "FULL_OBJECT",
"ContentType": "binary/octet-stream",
"ServerSideEncryption": "AES256",
"Metadata": {}
}
Related commands
Related commands are as follows: