```ruby
AWS::S3::Base.establish_connection!(
  :access_key_id     => ENV['AMAZON_ACCESS_KEY_ID'],
  :secret_access_key => ENV['AMAZON_SECRET_ACCESS_KEY']
)```

Change S3 connection persistence to false
user
```ruby
AWS::S3::Base.establish_connection!(
  :access_key_id      => ENV['AMAZON_ACCESS_KEY_ID'],
  :secret_access_key  => ENV['AMAZON_SECRET_ACCESS_KEY'],
  :persistent         => false
)```
assistant