【发布时间】:2017-02-04 01:25:26
【问题描述】:
使用 Cognito 凭据从浏览器调用我的 API 端点不会向发出请求的用户提供 lambda 函数。
我正在为端点使用 AWS_IAM 身份验证
这是请求在我的 lambda 中的样子:
module.exports.addItem = (event, context, done) => {
console.log(event.identity);
/**
accountId: "",
apiKey: "",
caller: "",
cognitoAuthenticationProvider: "",
cognitoAuthenticationType: "",
cognitoIdentityId: "",
cognitoIdentityPoolId: "",
sourceIp: "213.229.49.108",
user: "",
userAgent: "Mozilla/5.0 (X11; Linux x86_6....",
userArn: ""
*/
};
我想为用户执行一些 dynamodb 操作。如何获取用户?
【问题讨论】:
标签: amazon-dynamodb amazon-cognito aws-api-gateway