Not able to deploy serverless function

I’m trying to create a lambda function using serverless api. I’m using awscli in EC2 instance to provide aws credentials. I’m getting the following error

The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

Where should I change the request signature?

I think people may need more context in order to answer this question. What command did you issue that led to this error? You might also want to share your serverless config.