Created
October 29, 2013 07:47
-
-
Save yosiyuki/7210527 to your computer and use it in GitHub Desktop.
update all objects into public in s3 from rails console
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
s3 = AWS::S3.new(access_key_id: 'YOUR_ACCESS_KEY_ID', secret_access_key: 'YOUR_SECRET_ACCESS_KEY') | |
bucket = s3.buckets['bucket_name'] | |
bucket.objects.each{|obj| obj.acl = :public_read } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment