Getting Error while AWS s3 bucket uploading - "AuthorizationHeaderMalformed"

Job ID: 35172377

Budget: $8 – $15 USD

I am now trying to upload file to aws s3 bucket but now getting this error.

error: AuthorizationHeaderMalformed: The authorization header is malformed; the authorization header requires three components: Credential, SignedHeaders, and Signature.

The code was working well before making some progress but now getting this error and not sure why this is coming.
I guess it's because of AWS credential or sth but can't figure out.
Related categories: JavaScript Amazon Web Services RESTful Amazon S3