Can't rebuild due to AWS SDK gem bump and new AWS Data Integrity Protections

But I did for a site that’s using Backblaze. I created a template I put in /root/aws-revert-template.yml with this:

# This template reverts aws-sdk-s3 to a version that works with backblaze

params:
  home: /var/www/discourse

hooks:
  after_bundle_exec:
    - exec:
        cd: $home
        cmd:
          - bundle config set frozen false
          - "sed -i 's/gem \"aws-sdk-s3\", require: false/gem \"aws-sdk-s3\", \"1.177.0\", require: false/' Gemfile"
          - bundle update aws-sdk-s3
          - bundle add aws-sdk-core --version 3.215

And then added it to my app.yml like this:

# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
# TODO: change SOME_SECRET in this template

templates:
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"
  - "/root/aws-revert-template.yml"

And I ran an upgrade to stable and it seems to be working.

You could also just add what’s in the template to your app.yml

3 Likes