list-objects

Prev Next

Available in Classic and VPC

Get the list of objects stored in a Ncloud Storage bucket.

Note

For a Sub Account user to execute this command, they must have the View/ListBucket action permission.

Syntax

The list-objects syntax is as follows:

aws s3api list-objects \
    --bucket <bucket> \
    [--prefix <prefix>] \
    [--starting-token <starting-token>] \
    [--page-size <page-size>] \
    [--max-items <max-items>] \
    --endpoint-url <endpoint-url>
Note

We recommend using the latest version, list-objects-v2.

Options

This section describes the options available when running list-objects.

Required options

The following options are required for list-objects.

Options Type Required Description
--bucket String Required Bucket name

Optional options

These are the optional options for list-objects. Options that are not specified will use their default values.

Options Type Required Description
--prefix String Optional Prefix to query
--starting-token String Optional Location to start the query
--page-size Integer Optional Number of items per page
  • 1-1000
--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 --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: