Skip to content

Invalid signature for service "ProductAdvertisingAPI" due to downcasing of service name #41

Open
@dallagi

Description

@dallagi

Hello,
Thanks a lot for developing this library.

When trying to authenticate a request (by signing headers) to the ProductAdvertisingAPI service, AWS always responds with error 401: InvalidSignature.

After some digging, I noticed that this is caused by this line in the AWSAuth.AuthorizationHeader.sign/9 function:

service = String.downcase(service)

If I comment that line, AWS responds back with a successful response (200 OK).

I'm not sure if downcasing the service name is required for other use cases, but if it's not needed and this is indeed a bug, please let me know and I will submit a PR to fix it :)

EDIT: Submitted a PR in case it may be useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions