AWS S3仅适用于Cognito用户
我有一个React应用程序,用户应该能够将文件上传到S3存储桶中的文件并列出文件。我使用这软件包,我想仅允许记录的用户上传和列出文件。在AWS侧,我有多个触发lambda(node js)函数的API网关端点,可保存/从S3存储桶中获取文件。我想我将使用Cognito授权器来保护API端点。我的问题是:如何将文件保存到并从特定的S3 Bucket文件夹(前缀)获取文件,并限制用户只能从其自己的文件夹访问对象?
我已经阅读了许多文章和文档,但是我找不到正确的解决方案。
提前致谢!
I have a react app where users should be able to upload files to and list files from S3 buckets. I implemented Cognito auth using this package and I want to allow only logged users to upload and list files. On the AWS side, I have multiple API Gateway endpoints that trigger lambda (Node JS) function which saves/gets files on/from S3 bucket. I guess I'll use Cognito authorizer to secure API endpoints. My question is: how to save files to and get files from specific S3 bucket folder (prefix) and to restrict that user can access only objects from their own folder?
I have read many articles and docs but I haven't been able to find the right solution.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论