Available in Classic and VPC
Get the metadata of objects stored in an Ncloud Storage bucket.
For a Sub Account user to execute this command, they must have View/GetObject and View/GetObjectAttributes action permissions. To retrieve a specific version (--version-id), View/GetObjectVersion and View/GetObjectVersionAttributes action permissions are required.
Syntax
The get-object-attributes syntax is as follows:
aws s3api get-object-attributes \
--bucket <bucket> \
--key <key> \
--object-attributes <object-attributes> \
[--version-id <version-id>] \
[--max-parts <max-parts>] \
[--part-number-marker <part-number-marker>] \
[--sse-customer-algorithm <sse-customer-algorithm>] \
[--sse-customer-key <sse-customer-key>] \
[--sse-customer-key-md5 <sse-customer-key-md5>] \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running get-object-attributes.
Required options
The following options are required for get-object-attributes.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name |
--key |
String | Required | Object name |
--object-attributes |
List | Required | List of object attributes
|
Optional options
These are the optional options for get-object-attributes. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--version-id |
String | Optional | Object version ID |
--max-parts |
Integer | Optional | Maximum number of parts to include in the output
|
--part-number-marker |
Integer | Optional | Part number to use as the starting point for the part query
|
--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 retrieve an object's properties is successful, the requested property information and version information are returned.
Command
The command example is as follows:
aws s3api get-object-attributes --bucket my-test-bucket \
--key img/image.png \
--object-attributes ETag ObjectSize StorageClass \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
{
"LastModified": "Fri, 04 Sep 2026 06:19:10 GMT",
"ETag": "7cb4883d8f0eede455af0738a2d83b4b",
"StorageClass": "STANDARD",
"ObjectSize": 40960
}
Related commands
Related commands are as follows: