title: Rename Object in S3 using Ruby
body: <p>I want to rename an item in s3 using the Ruby sdk. How do I do this?</p>
  
  <p>I have tried:</p>
  
  <pre><code>require 'aws-sdk'
  s3 = AWS.config(
          :region =&gt; 'region',
          :access_key_id =&gt; 'key',
          :secret_access_key =&gt; 'key'
  )
  
  b = AWS::S3::Bucket.new(client: s3, name: 'taxalli')
  
  
      b.objects.each do |obj|
         obj.rename_to('imports/files/' + line.split(' ').last.split('/').last)
        end
  </code></pre>
  
  <p>But I dont see anything in the new sdk for moves or renames.</p>