【发布时间】:2020-01-27 14:13:27
【问题描述】:
我确实有一个受 AWS_IAM 授权保护的简单 AWS API Gateway 实施。
我只想通过 cURL 从命令行进行测试:
curl --location --request GET 'https://<API_ID>.execute-api.eu-west-1.amazonaws.com/stage?type=type&category=category&lc=lc&passprhase=passprhase&product=product'
--header 'Authorization: AWS4-HMAC-SHA256 Credential=<AWS_ACCESS_KEY>/20200127/eu-west-1/execute-api/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=<AWS_SECRET_ACCESS_KEY>' --header 'Content-Type: application/json' \
--data-raw '{"query":"","variables":{}}'
但不断收到以下错误:
Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header.
有人可以建议我做错了什么吗?
【问题讨论】:
标签: linux curl aws-api-gateway