ruby/example_code/s3/copy_object_encrypt_copy.rb
def run_me
  s3_client = Aws::S3::Client.new(region: 'us-west-2')

  if object_copied_with_encryption?(
    s3_client,
    'doc-example-bucket1',
    'my-source-file.txt',
    'doc-example-bucket2',
    'my-target-file.txt',
    'AES256'
  )
    puts 'Copied.'
  else
    puts 'Not copied.'
  end
end
# Full example call:
# Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon S3 .
def run_me
  s3_client = Aws::S3::Client.new(region: 'us-west-2')
  if object_copied_with_encryption?(
    s3_client,
    'doc-example-bucket1',
    'my-source-file.txt',
    'doc-example-bucket2',
    'my-target-file.txt',
    'AES256'
  )
    puts 'Copied.'
  else
    puts 'Not copied.'
  end
end
def run_me s3_client = Aws :: S3 :: Client . new ( region : 'us-west-2' ) if object_copied_with_encryption? ( s3_client , 'doc-example-bucket1' , 'my-source-file.txt' , 'doc-example-bucket2' , 'my-target-file.txt' , 'AES256' ) puts 'Copied.' else puts 'Not copied.' end end
Full example call:
Replace us-west-2 with the AWS Region you're using for Amazon S3.
Full example call : Replace us - west - 2 with the AWS Region you ' re using for Amazon S3 .