-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AuthorizationHeaderMalformed - the Credential is mal-formed #780
Comments
Can you attach a debug plugin to the s3 client and post the output? |
Any update on this? |
Its working now, can't reproduce, what i did. |
Ok. I'm closing this issue for now but feel free to reopen it if you're able to reproduce the error. |
Having same issue. It is giving me error only when using from an aws server. Works well when uploading from my local machine. |
@amitchhajer Can you attach a debug plugin to the s3 client and post the output? |
hey, tried setting up the log plugin but getting below error
gives: |
Sorry, I thought you were using v2. For v3, you can turn on debugging by adding |
here it is: `` -> Entering step init, name 's3.ssec'command was set to array(3) { request was set to array(0) { -> Entering step init, name 's3.source_file'no changes -> Entering step init, name 's3.save_as'no changes -> Entering step init, name 's3.location'no changes -> Entering step validate, name 'validation'no changes -> Entering step build, name 'builder'request.instance was set to 0000000064a40c39000000004c9763f1 request.body was set to �PNG IHDR�Rh���Cx��tEXtSoftwareAdobe ImageReadyq�e<��IDATx��]�q�;��Y�/]/�O{4�������Ed�"#�����H]�*��"�uܓf��Z��v������g�;�����,���ht��� -> Entering step build, name ''request.instance changed from 0000000064a40c39000000004c9763f1 to 0000000064a40c37000000004c9763f1 -> Entering step build, name 's3.checksum'no changes -> Entering step build, name 's3.content_type'request.instance changed from 0000000064a40c37000000004c9763f1 to 0000000064a40c34000000004c9763f1 -> Entering step sign, name 'retry'no changes -> Entering step sign, name 'signer'request.instance changed from 0000000064a40c34000000004c9763f1 to 0000000064a40c17000000004c9763f1 request.headers.X-Amz-Date was set to array(1) { request.headers.Authorization was set to array(1) { -> Entering step sign, name 's3.put_object_url'no changes -> Entering step sign, name 's3.permanent_redirect'no changes
<- Leaving step sign, name 's3.permanent_redirect'error was set to array(13) { IHDR�Rh���Cx��tEXtSoftwareAdobe ImageReadyq�e<��IDATx��]�q�;��Y�/]/�O{4�������Ed�"#�����H]�*��"�uܓf��Z��v������g�;�����,���ht��� Inclusive step time: 0.06715989112854 <- Leaving step sign, name 's3.put_object_url'no changes <- Leaving step sign, name 'signer'no changes <- Leaving step sign, name 'retry'no changes <- Leaving step build, name 's3.content_type'no changes <- Leaving step build, name 's3.checksum'no changes <- Leaving step build, name ''no changes <- Leaving step build, name 'builder'no changes <- Leaving step validate, name 'validation'no changes <- Leaving step init, name 's3.location'no changes <- Leaving step init, name 's3.save_as'no changes <- Leaving step init, name 's3.source_file'no changes <- Leaving step init, name 's3.ssec'no changes "Error executing "PutObject" on "https://s3-ap-southeast-1.amazonaws.com/prod-user-uploaded-images/MENU-ITEM-IMAGES/7ebdc1fd4ef261154d5dddbc958dcb48534b6d27.png"; AWS HTTP error: Client error: 400 AuthorizationHeaderMalformed (client): The authorization header is malformed; the Credential is mal-formed; expecting "/YYYYMMDD/REGION/SERVICE/aws4_request". - \n |
The auth header captured is: Is 'app/console doctrine:migaS3' somehow being set as the |
Yes right. I messed up a little in parameters. My bad. |
Hey, can you tell me how did you solve the error? |
For me, the error was simply having the key as 'credentials'. It should be 'credential' without the s on the end. |
I was having same issue in elasticsearch S3 repository plugin. It turns out my access key was incorrect. Remember to verify your credentials for any typo. |
When trying to connect to s3 or executing the sample.php, i get the same error.
AWS HTTP error: Client error: 400 AuthorizationHeaderMalformed (client): The authorization header is malformed; the Credential is mal-formed; expecting "<YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request".
The Error is related to setting the signing type. i get the same error with java sdk, if i dont use
clientConfiguration.setSignerOverride("AWSS3V4SignerType");
But specifying
signature
in my client does not help.$client = S3Client::factory(array( 'region' => 'eu-central-1', 'version' => 'latest', 'signature' => 'v4', 'http' => [ 'verify' => false ] ));
SO question:
http://stackoverflow.com/questions/32821946/how-to-connect-to-amazon-aws-s3-with-aws-sdk-php
The text was updated successfully, but these errors were encountered: