Testing your S3 REST API configuration

You can use the Amazon Web Services Command Line Interface (AWS CLI) to test your connection to the system and to verify that you can read and write objects to the system.

Before you begin

Steps

  1. Configure the Amazon Web Services settings to use the account you created in the StorageGRID Webscale system:
    1. Enter configuration mode:aws configure
    2. Enter the AWS Access Key ID for the account you created.
    3. Enter the AWS Secret Access key for the account you created.
    4. Enter the default region to use, for example, us-east-1.
    5. Enter the default output format to use, or press Enter to select JSON.
  2. Create a bucket.
    aws s3api --endpoint-url https://10.96.101.17:8082 
    --no-verify-ssl create-bucket --bucket testbucket
    If the bucket is created successfully, the location of the bucket is returned, as seen in the following example: "Location": "/testbucket"
  3. Upload an object.
    aws s3api --endpoint-url https://10.96.101.17:8082 --no-verify-ssl 
    put-object --bucket testbucket --key s3.pdf --body C:\s3-test\upload\s3.pdf
    If the object is uploaded successfully, an Etag is returned which is a hash of the object data.
  4. List the contents of the bucket to verify that the object was uploaded.
    aws s3api --endpoint-url https://10.96.101.17:8082 --no-verify-ssl 
    list-objects --bucket testbucket
  5. Delete the object.
    aws s3api --endpoint-url https://10.96.101.17:8082 --no-verify-ssl 
    delete-object --bucket testbucket --key s3.pdf
  6. Delete the bucket.
    aws s3api --endpoint-url https://10.96.101.17:8082 --no-verify-ssl 
    delete-bucket --bucket testbucket