Skip to content

Instantly share code, notes, and snippets.

@brand-it
Created September 20, 2018 13:33
Show Gist options
  • Save brand-it/0192c4b115f1aaa08260bbb33293373e to your computer and use it in GitHub Desktop.
Save brand-it/0192c4b115f1aaa08260bbb33293373e to your computer and use it in GitHub Desktop.
s3 = S3Util.new
s3.bucket.objects.each do |object|
if s3.bucket.object(object.key).server_side_encryption
puts "Skipping #{object.key}"
next
end
puts "Encrypting #{object.key}"
s3.turn_on_encryption(object.key)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment