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
Get the list of objects stored in a Ncloud Storage bucket.
For a Sub Account user to execute this command, they must have the View/ListBucket action permission.
Syntax
The list-objects-v2 syntax is as follows:
aws s3api list-objects-v2 \
--bucket <bucket> \
[--prefix <prefix>] \
[--start-after <start-after>] \
[--starting-token <starting-token>] \
[--page-size <page-size>] \
[--max-items <max-items>] \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running list-objects-v2.
Required options
The following options are required for list-objects-v2.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name |
Optional options
These are the optional options for list-objects-v2. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--prefix |
String | Optional | Prefix to query |
--start-after |
String | Optional | Object to start listing from |
--starting-token |
String | Optional | Location to start the query |
--page-size |
Integer | Optional | Number of items per page
|
--max-items |
Integer | Optional | Total number of items to include in the output |
Common options
For information about the options common to all aws subcommands, see Ncloud Storage options.
Examples
If the request to retrieve the list of objects is successful, the identification information, size, and storage class for each object are returned.
Command
The command example is as follows:
aws s3api list-objects-v2 --bucket my-test-bucket \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
{
"Contents": [
{
"Key": "img/copy.png",
"LastModified": "2026-08-19T02:49:44Z",
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "STANDARD"
},
{
"Key": "img/image.png",
"LastModified": "2026-08-19T02:49:43Z",
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "STANDARD"
},
{
"Key": "img/image2.png",
"LastModified": "2026-08-19T02:49:44Z",
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "DEEP_ARCHIVE"
},
{
"Key": "sample.txt",
"LastModified": "2026-08-19T02:44:28Z",
"ETag": "\"85641ff9e82a40a643bc74450bc8999f\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 48,
"StorageClass": "STANDARD"
}
],
"RequestCharged": null,
"Prefix": ""
}
Related commands
Related commands are as follows: