Deploy to AWS via provider:s3 is broken

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

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 got updated on that day, and now the latest version of that gem requires a higher version of Ruby.

How to fix this ?

Hi @nikhilo ,

Is this still happening?

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

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

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

     - 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

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.

Hi @toran414,

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

Hi all,

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

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.