Using Ozone S3 Gateway

Ozone offers an S3-compatible REST interface via the Ozone S3 Gateway, enabling users to access object store data using any S3-compatible tools. While the Ozone S3 Gateway is an optional component in standard Ozone installations, within Acceldata's ODP mpack, it is automatically installed and launched alongside the Ozone service. S3 buckets are stored within the /s3v volume.

Prerequisites

To use an S3 endpoint, configuring access key and secret for aws compatible tools is required. The following is an example of awscli.

  • Generate Access Key and Secret for AWS : If security is not enabled, you can use any AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. If security is enabled, you can get the key and the secret with the ozone s3 getsecret command (Kerberos based authentication is required).
Bash
Copy
  • Export these credentials on your S3 endpoint. In the following code block, credentials are updates for a new profile:
Bash
Copy

Alternatively, you can create a new profile with Ozone related credentials and use Ozone profile to run S3 utility tasks on awscli.

Bash
Copy
  • Finally, verify your S3 endpoint from the S3 Gateway UI:

Beginning with Ozone 1.4.0, the generated secret will only be displayed once when generated using getsecret. In the event of the secret being lost, users must first revoke the secret before generating a new one using getsecret.

Ozone S3 Gateway to work with AWS CLI

Ozone S3 Gateway supports various bucket and object operations that the Amazon S3 API provides. Amazon Web Services (AWS) command-line interface (CLI) is one such utility tool, used to interact with S3 Gateway and work with various Ozone storage elements.

Examples of using AWS CLI for Ozone S3 Gateway :

  • Create new bucket:
Bash
Copy
  • Upload key to new bucket:
Bash
Copy
Bash
Copy
  • Confirm key upload:
Bash
Copy
  • Verify file content through Ozone:
Bash
Copy

SSL Enabled Ozone S3 Gateway to Work with AWS CLI

For an SSL-enabled Ozone setup, the S3 Gateway utilizes an HTTPS endpoint. When using Python with the AWS CLI, SSL support is contingent on certificates being in the PEM format. Therefore, ensure your CA certificate is converted to PEM format if it's currently in another format, across all necessary client nodes.

Bash
Copy

Pass the certificate in PEM file format to the aws s3api commands to perform S3 utility tasks. For example:

  • Create a new bucket:
Bash
Copy
  • Upload the key to the new bucket:
Bash
Copy
Bash
Copy
  • Confirm the key upload:
Bash
Copy
  • Verify the file content through Ozone:
Bash
Copy

Revoke Access to Generated AWS Credentials

Revoke access to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY once your use case is completed.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated