Created
April 4, 2018 17:45
-
-
Save mnadel/bef6e74ae1976baf4043e890e752196d to your computer and use it in GitHub Desktop.
`ls -l` all objects in an S3 bucket
This file contains hidden or 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
#!/usr/bin/env ruby | |
require "aws-sdk-s3" | |
bucket = Aws::S3::Resource.new.bucket(ARGV[0]) | |
bucket.objects().each do |obj| | |
puts "#{obj.size} #{obj.key} #{obj.last_modified}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment