Skip to content

Conversation

@st3llaris
Copy link

Fixes the error firehose not supported in region sa-east-1 for partition aws

** (RuntimeError) firehose not supported in region sa-east-1 for partition aws
    (ex_aws 2.6.0) lib/ex_aws/config/defaults.ex:206: ExAws.Config.Defaults.fetch_or/3
    (ex_aws 2.6.0) lib/ex_aws/config/defaults.ex:189: ExAws.Config.Defaults.do_host/3
    (ex_aws 2.6.0) lib/ex_aws/config/defaults.ex:120: ExAws.Config.Defaults.get/2
    (ex_aws 2.6.0) lib/ex_aws/config.ex:102: ExAws.Config.build_base/2
    (ex_aws 2.6.0) lib/ex_aws/config.ex:75: ExAws.Config.new/2
    (ex_aws 2.6.0) lib/ex_aws.ex:73: ExAws.request/2

While this is not yet merged and you are having this issue right now, I wrote a script that manually patches it:

#!/bin/bash
# Script to patch ex_aws endpoints.exs to add sa-east-1 support for Firehose

ENDPOINTS_FILE="deps/ex_aws/priv/endpoints.exs"

if [ ! -f "$ENDPOINTS_FILE" ]; then
  echo "Error: $ENDPOINTS_FILE not found. Run 'mix deps.get' first."
  exit 1
fi

if grep -A 15 '"firehose" => %{' "$ENDPOINTS_FILE" | grep -q '"sa-east-1" => %{}'; then
  echo "Patch already applied to $ENDPOINTS_FILE"
  exit 0
fi

sed -i.bak '/"me-central-1" => %{},/a\
            "sa-east-1" => %{},' "$ENDPOINTS_FILE"

if [ $? -eq 0 ]; then
  echo "Successfully patched $ENDPOINTS_FILE to add sa-east-1 support for Firehose"
  rm -f "$ENDPOINTS_FILE.bak"
else
  echo "Error: Failed to patch $ENDPOINTS_FILE"
  exit 1
fi

Run:

mix deps.get
chmod +x patch_ex_aws_endpoints.sh
./patch_ex_aws_endpoints.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant