Skip to main content
How to enable StorageGRID in your environment

Use S3cmd to test and demonstrate S3 access on StorageGRID

Contributors netapp-aronk

S3cmd is a free command line tool and client for S3 operations. You can use s3cmd to to test and demonstrate s3 access on StorageGRID.

Install and configure S3cmd

To install S3cmd on a workstation or server, download it from command line S3 client. s3cmd is pre-installed on each StorageGRID node as a tool to aid in troubleshooting.

Initial configuration steps

  1. s3cmd --configure

  2. Provide only access_key and secret_key, for the the rest keep the defaults.

  3. Test access with supplied credentials? [Y/n]: n (bypass the test as it will fail)

  4. Save settings? [y/N] y

    1. Configuration saved to '/root/.s3cfg'

  5. In .s3cfg make fields host_base and host_bucket empty after the "=" sign :

    1. host_base =

    2. host_bucket =

Note If you specify host_base and host_bucket in step 4, you don't need to specify an endpoint with --host in the CLI. Example:
            host_base =
            host_bucket = bucketX.
            s3cmd ls s3://bucketX --no-check-certificate

Basic command examples

  • Create a bucket:

    s3cmd mb s3://s3cmdbucket --host=<endpoint>:<port> --no-check-certificate

  • List all buckets:

    s3cmd ls --host=<endpoint>:<port> --no-check-certificate

  • List all buckets and their contents:

    s3cmd la --host=<endpoint>:<port> --no-check-certificate

  • List objects in a specific bucket:

    s3cmd ls s3://<bucket> --host=<endpoint>:<port> --no-check-certificate

  • Delete a bucket:

    s3cmd rb s3://s3cmdbucket --host=<endpoint>:<port> --no-check-certificate

  • Put an object:

    s3cmd put <file> s3://<bucket> --host=<endpoint>:<port> --no-check-certificate

  • Get an object:

    s3cmd get s3://<bucket>/<object> <file> --host=<endpoint>:<port> --no-check-certificate

  • Delete an object:

    s3cmd del s3://<bucket>/<object> --host=<endpoint>:<port> --no-check-certificate

By Aron Klein