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

The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential. #987

Open
azharmalik3 opened this issue Aug 31, 2023 · 2 comments

Comments

@azharmalik3
Copy link

azharmalik3 commented Aug 31, 2023

Environment

  • Elixir version 1.14 & Erlang version 24
  • ExAws version 2.5.0
  • HTTP client version 1.18.1

Current behavior

Mostly failed to read/upload files but after retrying 3/4 times it works and reads files.

Sample code to read file:

ExAws.S3.get_object("project-assets", "yallo-gjuyq/ealog-jxsyr.png") |> ExAws.request()

Expected behaviour

It should read/write the file on the first attempt.

Error

<Error>
  <Code>AuthorizationHeaderMalformed</Code>
  <Message>The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential.</Message>
  <RequestId>8BNSPWDTRBZ8ZSGG</RequestId>
  <HostId>eYIsLyoStWtle4KHE0lCM/ipmKEwqXNvfe37kwciV5pX5aoRKe9TE0cpARb1Cvw9K7t3YbKvIsY=</HostId>
</Error>
@bernardd
Copy link
Contributor

That's weird. What's your config look like (with keys redacted, obviously)? Because it works fine for plenty of people so there must be something specifically weird in your setup.

@azharmalik3
Copy link
Author

It worked fine before the update to the latest version (2.5.5) and used the same config.

config :ex_aws,
  access_key_id: System.fetch_env!("AWS_ACCESS_KEY_ID"),
  secret_access_key: System.fetch_env!("SECRET_ACCESS_KEY"),
  region: "eu-west-1",
  json_codec: Jason

Then we revert back the version to 2.4.4 and it works.

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

2 participants