Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request, support endpoint based buckets (e.g. eu-west-2) #95

Open
JonRowe opened this issue Sep 22, 2020 · 0 comments
Open

Feature request, support endpoint based buckets (e.g. eu-west-2) #95

JonRowe opened this issue Sep 22, 2020 · 0 comments

Comments

@JonRowe
Copy link

JonRowe commented Sep 22, 2020

Environment

  • Elixir & Erlang versions (elixir --version):

Elixir 1.10.0 (compiled with Erlang/OTP 22)

  • ExAws version mix deps |grep ex_aws
ex_aws 2.1.5 (Hex package) (mix)
  locked at 2.1.5 (ex_aws) 0f0357f1
* ex_aws_s3 2.0.2 (Hex package) (mix)
  locked at 2.0.2 (ex_aws_s3) 0569f5b2
  • HTTP client version. IE for hackney do mix deps | grep hackney
* hackney 1.16.0 (Hex package) (rebar3)
  locked at 1.16.0 (hackney) 3bf0bebb

Current behaviour

Specified region is ignored and the us endpoint is used, causing a redirect which ExAws returns as an error and warns about setting region, but setting region has no effect.

# Copying file within the same bucket.
config = ExAws.Config.new(:s3) |> Map.put(:region, "eu-west-2")
ExAws.request(ExAws.S3.put_object_copy(bucket(), destination_path, bucket(), source_path, config))

Produces:

# 22:13:19.849 [warn] ExAws: Received redirect, did you specify the correct region?
# {:error, {:http_error, 301, "redirected"}}

Expected behavior

The operation succeeds without redirecting because ExAws has used the correct endpoint.

e.g. Operations need to use https://my-bucket.s3.amazonaws.com and not https://s3.amazonaws.com/my-bucket

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

No branches or pull requests

1 participant