Skip to content

Instantly share code, notes, and snippets.

@therod
Created March 30, 2018 18:17
Show Gist options
  • Save therod/90aa53bb949c3cdb09cd78f3d0add6d7 to your computer and use it in GitHub Desktop.
Save therod/90aa53bb949c3cdb09cd78f3d0add6d7 to your computer and use it in GitHub Desktop.
require 'pry'
keys = `aws s3api list-objects --bucket master21 --query 'Contents[].{Key: Key}' --output text | grep -v 'folder'`
keys = keys.split("\n")
keys.each do |key|
system("aws s3api put-object-acl --acl bucket-owner-full-control --bucket master21 --key '#{key}'")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment