You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
284 B

require 'aws-sdk'
bucket = ENV.fetch('CPI_FEED_AWS_BUCKET')
key = ARGV.first || ENV.fetch('CPI_FEED_AWS_KEY')
puts Aws::S3::Resource.new.bucket(bucket).object(key).put(
body: $stdin.read
)
puts Aws::S3::Client.new.put_object_acl(
bucket: bucket, key: key, acl: 'public-read'
)