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
)