“...I've been working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix and learning Rust. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working for InPay...”

Rob Lacey (contact@robl.me)
Senior Software Engineer, Brighton, UK

Copying S3 objects around, even between buckets.

Saved some bandwidth and moved stuff around to get our house in order. Need to remember this example.

source = 'downloads.bigblindmedia/download/files/files/000/000/929/original/Banded_Sandwich_by_Iain_Moran_Download.mp4'
target = 'download/videos/files/000/000/929/original/Banded_Sandwich_by_Iain_Moran_Download.mp4'

s3 = Aws::S3::Client.new(
  region: 'eu-west-2',
  access_key_id: '********',
  secret_access_key: '********'
)

s3.copy_object(
  copy_source: source, 
  bucket: 'downloads.bigblindmedia',
  key: target
)