Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Basic Aws::S3::Client usage
=begin
{
"AccessKey": {
"UserName": "s3.deploy.foo",
"Status": "Active",
"CreateDate": "2016-11-04T16:25:27.123Z",
"SecretAccessKey": "secret",
"AccessKeyId": "access"
}
}
=end
require "aws-sdk"
access = "access"
secret = "secret"
region = "us-east-1"
bucket = "the-bucket-name"
s3 = Aws::S3::Client.new(
access_key_id: access,
secret_access_key: secret,
region: region
)
s3.list_objects(bucket: bucket)
s3.put_object(bucket: bucket, key: "whatever/path", body: "hello, world")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment