STS AssumeRole error: AWS Access Key "does not exist in our records"

STS AssumeRole error: AWS Access Key "does not exist in our records"

我正在做一个 API Gateway/Lambda-based 项目。请求流程如下:

该过程的每一步都在工作(通过控制台日志确认),除了最后一步。当我尝试使用生成的凭据时,收到以下错误消息:

   {
      "message": "The AWS Access Key Id you provided does not exist in our records.",
      "code": "InvalidAccessKeyId",
      "region": null,
      "time": "2019-07-19T22:05:05.817Z",
      "requestId": "...",
      "extendedRequestId": "...",
      "statusCode": 403,
      "retryable": false,
      "retryDelay": 68.28400384749038
    }

我知道这强烈暗示我不明白关于 STS 的某些东西,但我一直无法弄清楚是什么。 (例如,AWS 是否会在授权方 lambda 完成时取消分配生成的角色 运行?)

为什么 AWS 会拒绝一对新生成的凭证并报告此错误消息?

根据 the AssumeRole documentation,返回的 SessionToken 也必须包含在使用生成的凭据的任何请求中。

When you make a call using temporary security credentials, the call must include a session token, which is returned along with those temporary credentials. AWS uses the session token to validate the temporary security credentials.

我曾假设生成的凭据与用户访问密钥完全一样,并希望调用仅使用这两条信息即可成功。