Deploy step fails with `initialize': execution expired (Seahorse::Client::NetworkingError)

This build worked fine in the past : Travis CI - Test and Deploy with Confidence

But now it seems to have problems on the deploy step: Travis CI - Test and Deploy with Confidence

with this error:

/home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/net/http.rb:904:in `initialize’: execution expired (Seahorse::Client::NetworkingError)

Some other threads mentioned that this might be a connection issue so I checked the S3 bucket and it’s there, it’s accessible etc.

my .travis.yml:

sudo: false
language: node_js
node_js:
  - "node"
install: npm install
script:
  - npm test
  - gulp
cache:
  directories:
    - node_modules
# Deploy using awscli to enable pruning of removed files
before_deploy: pip install --user awscli
deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  bucket: www.cafe-grundeinkommen.org
  skip_cleanup: true
  local_dir: build
  acl: public_read
  endpoint: https://www.cafe-grundeinkommen.org.s3-website.eu-central-1.amazonaws.com
  on:
    branch: master
  region: eu-central-1
  cache_control: "max-age=21600"
after_deploy:
  # Allow `awscli` to make requests to CloudFront.
  - aws configure set preview.cloudfront true
  # Invalidate every object in the targeted distribution.
  - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"

How big are the files you are trying to upload?

It’s just a website. The build folder that is deployed is 6.74 MB (7,069,510 bytes)
The largest single file is 383kb

Any ideas?

Besides slow connections, I’m afraid not.

For future searchers, my AWS credentials were wrong, but this error message seemed to be pointing to something else.

Once I removed the endpoint from the deploy settings in the travis.yml then I saw the proper error (as in this build: https://travis-ci.org/CirclesUBI/cafe-grundeinkommen-website/jobs/508396010/config)