Skip to content

Instantly share code, notes, and snippets.

View GWuk's full-sized avatar

GWu GWuk

  • Austria
View GitHub Profile
@GWuk
GWuk / s3sync_v2.rb
Last active December 26, 2015 21:16 — forked from bantic/bucket_sync_service.rb
ruby class to copy from one aws s3 bucket to another - using aws-sdk Version 2
#!/usr/bin/env ruby
require 'aws-sdk' # gem name is 'aws-sdk', uses Version 2
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger, :path, :etag
attr_accessor :debug
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id