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

SignatureDoesNotMatch. The request signature we calculated does not match the signature you provided. Check your key and signing method. #1045

Open
briankariuki opened this issue Apr 2, 2024 · 0 comments

Comments

@briankariuki
Copy link

briankariuki commented Apr 2, 2024

Environment

  • Elixir & Erlang versions Elixir 1.16.2 (compiled with Erlang/OTP 26):
  • ExAws version 2.5.1
  • HTTP client version. hackney 1.20.1

Current behavior

This code that streams a file from s3 lineline works in dev mode. I'm using minio as my storage server. When I make this request in production I get the error below. The code snippet I got from the ex_aws_s3 docs on streaming files.

bucket
      |> ExAws.S3.download_file(file, :memory, opts)
      |> ExAws.stream!(scheme: scheme <> "://", host: host, port: nil)
      |> Stream.chunk_while("", &chunk_fun/2, &to_line_stream_after_fun/1)
      |> Stream.concat()
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><Key>uploads/moh505_test_data.csv</Key><BucketName>shield</BucketName><Resource>/shield/uploads/moh505_test_data.csv</Resource><RequestId>17C2848BAE0756DC</RequestId><HostId>c982ebc0b30b0b1e6851f91e1fd25224e8a9cfb5f459a7264d11acb53d47a971</HostId></Error>

Expected behavior

I expect the code to work as does in dev. I don't know if its my nginx configuration or something else. File uploads, generating download links, getting a file object all work, so its not an issue with my credentials.

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