ExAws.S3 Auth issues

When i try these command got error like below

ExAws.S3.list_objects("bucket_name") |> ExAws.request(region: "my_region")

** (ArgumentError) expected a keyword list, but an entry in the list is not a two-element tuple with an atom as its first element, got: {“content-length”, 0}
(elixir 1.11.0) lib/keyword.ex:475: Keyword.keys/1
(ex_aws 1.1.5) lib/ex_aws/auth.ex:111: ExAws.Auth.build_canonical_request/5
(ex_aws 1.1.5) lib/ex_aws/auth.ex:96: ExAws.Auth.signature/8
(ex_aws 1.1.5) lib/ex_aws/auth.ex:87: ExAws.Auth.auth_header/7
(ex_aws 1.1.5) lib/ex_aws/auth.ex:39: ExAws.Auth.headers/6
(ex_aws 1.1.5) lib/ex_aws/request.ex:27: ExAws.Request.request_and_retry/7
(ex_aws 1.1.5) lib/ex_aws/operation/s3.ex:40: ExAws.Operation.ExAws.Operation.S3.perform/2

ExAws.Config.new(:s3)

When i try these command it return my key and secret_access_key that all are correct.

Please suggest me how to do this thing done

1 Like

what ex_aws version? try with 2.1.6, looks like you are using 1.1.5 which is from 2017…

1 Like

here is my current version

{:ex_aws, "~> 2.1"}

my elixir version is

Erlang/OTP 23 [erts-11.1.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.11.1 (compiled with Erlang/OTP 23)

hmm, but it’s still the same error?

make sure you run mix deps.get to update ex_aws…

Can you show your ex_aws config as well?

Hi @AungMyoOo168,

To fix this problem, you might have to update to the latest version
{:ex_aws, "~> 2.1.6"}
And run mix deps.get

I had the same problem

Cheers

3 Likes

The problem got solved when i changed the version to
{:ex_aws, "~> 2.1.6"}

Thanks much bro

4 Likes

The problem got solved when i changed the version to
{:ex_aws, "~> 2.1.6"}

1 Like