ServerlessError: not a valid key=value pair (missing equal-sign) in Authorization header

I am trying to deploy my service from circleci.

When running the command:

sls deploy -s production

I get the following error:

ServerlessError: '/20180330/ap-south-1/cloudformation/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=XXXXXXXXXXXX /20180330/ap-south-1/cloudformation/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXX'

I do not get this error when deploying from my local.

I have created a sample code which is very similar to the one I am having problem with. https://github.com/deepakputhraya/serverless-koa
But I am able to deploy the above code from my local as well as CirclCIi.

Where you able to resolve this error? I am recieving the same one.

No. I was not able to. I am handling the deployments from local, yet to find a solution.

Still no solution for this issue, I’m stuck with my pipeline, don’t know what’s happening

Had this problem to with pipeline in gitlab. Turned out that when copy pasting the credentials from aws to the gitlab variables some spaces were copied to causing a malformed URL.

1 Like

Same here, there was space on key, you saved my day