Skip to main content

We've Moved!

Product Documentation has moved to docs.hitachivantara.com
Hitachi Vantara Knowledge

Using third-party tools with the Hitachi API for Amazon S3

The Hitachi API for Amazon S3 is compatible with many third-party tools that support Amazon S3. These tools generally require some setup before you can use them.

This section of the Help describes the information you need to set up third-party tools to work with the S3 compatible API. It also contains specific instructions for setting up s3curl to work with the S3 compatible API.

General setup information for third-party tools

Typically, when configuring a third-party tool to work with the S3 compatible API, you need to provide this information:

  • Service point

    This is the fully qualified hostname of the tenant in the context of which you plan to create and manage buckets and the objects in them. For example, if the tenant name is europe and the HCP system domain name is hcp.example.com, you specify the service point like this:

    europe.hcp.example.com
  • Access key

    This is the Base64-encoded username for the HCP user account you want to use for authenticated access to HCP.

  • Secret key

    This is the MD5-hashed password for the above HCP user account.

s3curl setup

The examples in this book use s3curl, which is a freely available open-source tool that you can install on your client computer. You can download s3curl from http://aws.amazon.com/code/128.

After installing s3curl, you need to configure it to work in your environment.

Specifying an access key and secret key

To specify the access key and secret key for an HCP user account, create a file named .s3curl in your home directory. In this file, provide the necessary information in this format:

%awsSecretAccessKeys = (
  # HCP accounts
  account-name => {
    id => 'access-key',
    key => 'secret-key',
  },
);

account-name is the name to use in the id parameter in your s3curl commands.

For example:

%awsSecretAccessKeys = (
     # HCP accounts
     lgreen => {
          id => 'bGdyZWVu',
          key => '35dc4c4aa08fe0deab7e292e00eb8e97',
     },
);

To specify the access key and secret key for additional user accounts, repeat this portion of the file for each account:

 account-name => {
    id => 'access-key',
    key => 'secret-key',
  },

Here’s a sample .s3curl file that specifies the access key and secret key for each of two user accounts:

%awsSecretAccessKeys = (
     # Hitachi Vantara account
     lgreen => {
          id => 'bGdyZWVu',
          key => '35dc4c4aa08fe0deab7e292e00eb8e97',
     },
     mwhite => {
          id => 'bXdoaXRl',
          key => 'ad49ce36d0cec9634ef63b24151be0fb',
     },
);

Specifying a tenant

In an S3 compatible request, you specify the tenant you’re using as the service point in the s3curl.pl file, which is in the s3curl directory. In this file, find the line that begins like this:

my @endpoints = (

Between the opening parenthesis shown above and the first closing parenthesis that follows it, add the tenant URL in this format:

'tenant-name.hcp-domain-name',

For example:

my @endpoints = ('europe.hcp.example.com',);

To specify additional tenants, follow this example:

my @endpoints = ('europe.hcp.example.com',
                                  'america.hcp.example.com',
                                  'africa.hcp.example.com',);

 

  • Was this article helpful?