Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created April 27, 2015 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahemoff/09038e1794a76babea02 to your computer and use it in GitHub Desktop.
Save mahemoff/09038e1794a76babea02 to your computer and use it in GitHub Desktop.
aws-s3 v2 gem example
# Elaborating on https://docs.aws.amazon.com/AWSRubySDK/latest/index.html
Aws.config.update(
region: 'us-east-1', # https://docs.aws.amazon.com/general/latest/gr/rande.html
credentials: Aws::Credentials.new(
Figaro.env.s3_access_key_id,
Figaro.env.s3_secret_access_key
)
)
s3 = Aws::S3::Client.new
resp = s3.list_buckets
puts resp.buckets.map(&:name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment