Last active
August 29, 2015 14:15
-
-
Save trevorrowe/7a36332bed24791a1196 to your computer and use it in GitHub Desktop.
Uploading files to Amazon S3 using the AWS SDK for Ruby v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can pass client options directly to the Resource constructor, | |
# no need to construct a client yourself | |
s3 = Aws::S3::Resource.new( | |
credentials: Aws::Credentials.new('akid', 'secret'), | |
region: 'eu-west-1' | |
) | |
s3.bucket('backup').object('dir/subdir/filename.txt').upload_file(local_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment