Skip to content

Instantly share code, notes, and snippets.

@davidillsley
Last active December 28, 2015 09:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidillsley/7481319 to your computer and use it in GitHub Desktop.
Save davidillsley/7481319 to your computer and use it in GitHub Desktop.
Accessing EMC Atmos using S3 tooling

Accessing EMC Atmos using S3 tooling

There are loads of tools out there built around the AWS APIs. In response to that, some software comes with an AWS compatibility layer. One of them is EMC Atmos.

There's a surprising lack of documentation on how to actually use this compatibility. The best I could find is the "EMC® Atmos™ Version 2.1 Programmer’s Guide P/N 300-013-493 REV 01". However, all it does it tell you that the S3 compatibility is hosted on a different port, and which operations are supported. It doesn't give any hints on how to get any tools working.

The main gotcha seems to be that the S3 API has both a path and DNS based way of accessing buckets. It's important to use the path based mechanism.

JetS3t

JetS3t is a java toolkit for S3. This can be configured to connect to Atmos by setting the following properties in jets3t.properties

s3service.s3-endpoint=atmoshost.example.com
s3service.s3-endpoint-https-port=8443
s3service.disable-dns-buckets=true

You may also have to import the SSL cert into the java truststore if the provider is using a CA not present in the default truststore.

fog

fog is a ruby library for accessing cloud services. While it has a 'native' Atmos provider, it's also useful for verifying/demonstrating access to the S3 API.

To create a connection, use the following (with fog 0.18.0):

require 'rubygems'
require 'fog'

connection = Fog::Storage.new({
  :provider                 => 'AWS',
  :aws_access_key_id        => 'ATMOS_UID',
  :aws_secret_access_key    => 'ATMOS_SHARED_SECRET',
  :host                     => 'atmoshost.example.com',
  :port                     => '8443',
  :path_style               => 'true'
})

Then to create a directory:

directory = connection.directories.create(
  :key    => "fog-demo-#{Time.now.to_i}", # globally unique name
  :public => true
)

And then list directories:

p connection.directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment