I have successfully encrypted the required parameters, but I am posting the data to this URL
Drops me this error AuthorizationHeaderMalformedThe authorization header is malformed; incorrect service "execute-api". This endpoint belongs to "s3".9DD75A286E7422B6rxCxNZ3veB/3ZJ1qrtvleA0JaHTPqprLYe3I5mM/LYLLEVPL6iKGv0irGmV1O9SS4AcmPsM/8/I=
$headers = [
'Content-Type: text/plain; charset=utf-8',
'X-Amz-Content-Sha256: UNSIGNED-PAYLOAD',
'X-Amz-Date: 20210105T095435Z',
'Authorization: AWS4-HMAC-SHA256 Credential={ access-key-when-create-IAM }/20210105/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-access-token;x-amz-content-sha256;x-amz-date, Signature={generated through auth process}',
];
I have lost no idea what's wrong. Any help will be appreciated.
Change service from 'execute-api' to 's3'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.