Last active
March 30, 2020 17:35
-
-
Save romankovt/0b67c0497023e28e521458286df33e55 to your computer and use it in GitHub Desktop.
aws s3 upload ruby example
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
require 'aws-sdk-s3' | |
Aws.config.update({ | |
region: 'eu-central-1', | |
credentials: Aws::Credentials.new('ACCESS_KEY_ID', 'SECRET_ACCESS_KEY') | |
}) | |
s3 = Aws::S3::Resource.new(region:'eu-central-1') | |
obj = s3.bucket('BUCKET_NAME').object('FILE_NAME') | |
obj.upload_file('PATH_TO_FILE') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment