# Deploy to AWS via provider:s3 is broken

**URL:** <https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095>\
**Category:** Deployment\
**Tags:** aws\
**Created:** [November 27, 2023, 6:52am UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095 "2023-11-27T06:52:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhilo](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nikhilo/32/9058_2.png) [@nikhilo](https://travis-ci.community/u/nikhilo)\
**Post date:** [November 27, 2023, 6:52am UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/1 "2023-11-27T06:52:57Z")

</div>

Deployment using the S3 provider has stopped working since Nov 22 2023.  
Here is the error,

```auto
Installing deploy dependencies
Fetching aws-sigv4-1.7.0.gem
Fetching mime-types-data-3.2023.1003.gem
Fetching aws-eventstream-1.3.0.gem
Fetching aws-sdk-core-2.11.632.gem
Fetching jmespath-1.6.2.gem
Fetching aws-sdk-2.11.632.gem
Fetching mime-types-3.5.1.gem
Fetching aws-sdk-resources-2.11.632.gem
Fetching dpl-s3-1.10.16.gem
Successfully installed mime-types-data-3.2023.1003
Successfully installed mime-types-3.5.1
ERROR: Error installing dpl-s3:
	The last version of aws-eventstream (~> 1, >= 1.0.2) to support your Ruby & RubyGems was 1.2.0. Try installing it with `gem install aws-eventstream -v 1.2.0` and then running the current command again
	aws-eventstream requires Ruby version >= 2.5. The current ruby version is 2.4.5.335.
/home/travis/.rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dpl/provider/s3 (LoadError)
	from /home/travis/.rvm/rubies/ruby-2.4.5/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/provider.rb:93:in `rescue in block in new'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/provider.rb:68:in `block in new'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/cli.rb:41:in `fold'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/provider.rb:67:in `new'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/cli.rb:31:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/lib/dpl/cli.rb:7:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.16/bin/dpl:5:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.4.5/bin/dpl:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.4.5/bin/dpl:23:in `<main>'
failed to deploy

```

It seems the gem [aws-eventstream](https://rubygems.org/gems/aws-eventstream) got updated on that day, and now the latest version of that gem requires a higher version of Ruby.

How to fix this ?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [November 27, 2023, 9:22pm UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/2 "2023-11-27T21:22:05Z")

</div>

Hi @nikhilo ,

Is this still happening?

---

<div class="post-metadata">

**Author:** ![nikhilo](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nikhilo/32/9058_2.png) [@nikhilo](https://travis-ci.community/u/nikhilo)\
**Post date:** [November 28, 2023, 5:51am UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/3 "2023-11-28T05:51:26Z")

</div>

Yes, I just restarted a build and it’s still happening. Here is the deploy block for reference

```auto
deploy:
  - provider: s3
    access_key_id: $AWS_ACCESS_KEY_ID
    secret_access_key: $AWS_SECRET_ACCESS_KEY
    bucket: my-app-bucket
    local_dir: ${TRAVIS_BUILD_DIR}/release
    skip_cleanup: true
    acl: private
    file: myapp-${TRAVIS_BUILD_NUMBER}.tar.gz
    upload-dir: myapp
    on:
      all_branches: true
      repo: myrepo

```

---

<div class="post-metadata">

**Author:** ![nikhilo](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nikhilo/32/9058_2.png) [@nikhilo](https://travis-ci.community/u/nikhilo)\
**Post date:** [November 28, 2023, 8:55am UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/4 "2023-11-28T08:55:51Z")

</div>

I was able to get around it by pinning the problematic gems in `before_deploy` stage

```auto
     - rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install aws-eventstream -v 1.2.0
     - rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install aws-sigv4 -v 1.6.1

```

---

<div class="post-metadata">

**Author:** ![toran414](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/toran414/32/9062_2.png) [@toran414](https://travis-ci.community/u/toran414)\
**Post date:** [November 30, 2023, 7:03pm UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/5 "2023-11-30T19:03:42Z")

</div>

We are also having this same problem as well. @nikhilo’s workaround is working, but it would be optimal to not have to do that.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [December 5, 2023, 5:31pm UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/6 "2023-12-05T17:31:40Z")

</div>

Hi @toran414,

We are currently investigating this and will apply a fix as soon as possible.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [December 7, 2023, 6:10pm UTC](https://travis-ci.community/t/deploy-to-aws-via-provider-s3-is-broken/14095/7 "2023-12-07T18:10:01Z")

</div>

Hi all,

Please use `edge: true` within the deploy phase.So for example @nikhilo,

```yaml
deploy:
  - provioder: s3
    edge: true
    access_key_id: $AWS_ACCESS_KEY_ID
    secret_access_key: $AWS_SECRET_ACCESS_KEY
    bucket: my-app-bucket
    local_dir: ${TRAVIS_BUILD_DIR}/release
    skip_cleanup: true
    acl: private
    file: myapp-${TRAVIS_BUILD_NUMBER}.tar.gz
    upload-dir: myapp
    on:
      all_branches: true
      repo: myrepo

```

Let me know if this works.
