Firebase 授权访问 Aws DynamoDB

Firebase auth to access Aws DynamoDB

我要创建一个 json 返回 api 托管在 aws 上(aws 必须不能使用 Firebase 云函数)。

已登录webapp的用户只能访问api.

我发现 Serverless Api with Aws Api Gateway + DynamoDB 不使用 Aws Lambda 函数。

可以使用非免费的 AWS Cognito 限制访问!

FirebaseAuth 是 free!。所以我的问题是如何使用 firebase auth 来限制对以上 api?

的访问

这篇文章可能会有一些帮助。

您需要设置自定义授权方:

https://aws.amazon.com/blogs/mobile/integrating-amazon-cognito-user-pools-with-api-gateway/ https://blog.novoda.com/custom-authentication-with-amazon-cognito-and-firebase/