【发布时间】:2021-07-04 14:08:42
【问题描述】:
我很确定我已经正确配置了 cognito,因为我可以注册、登录和退出。一切都在 aws-exports 中配置。有人知道如何调试吗?
$ amplify add storage
? Please select from one of the below mentioned services: Content (Images, audio, video, etc.)
? Please provide a friendly name for your resource that will be used to label this category in the project: botshopsStorage
? Please provide bucket name: botshops
? Who should have access: Auth and guest users
? What kind of access do you want for Authenticated users? create/update, read, delete
? What kind of access do you want for Guest users? read
? Do you want to add a Lambda Trigger for your S3 Bucket? No
Auth configuration is required to allow unauthenticated users, but it is not configured properly.
An error occurred when adding the storage resource
Error: Auth configuration is required to allow unauthenticated users, but it is not configured properly.
at configure (C:\snapshot\node_modules\amplify-category-storage\lib\provider-utils\awscloudformation\service-walkthroughs\s3-walkthrough.js:405:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async addWalkthrough (C:\snapshot\node_modules\amplify-category-storage\lib\provider-utils\awscloudformation\service-walkthroughs\s3-walkthrough.js:58:12)
at async Object.executeAmplifyCommand (C:\snapshot\node_modules\amplify-category-storage\lib\index.js:114:3)
at async executePluginModuleCommand (C:\snapshot\node_modules\@aws-amplify\cli\lib\execution-manager.js:163:5)
at async Object.executeCommand (C:\snapshot\node_modules\@aws-amplify\cli\lib\execution-manager.js:35:9)
at async Object.run (C:\snapshot\node_modules\@aws-amplify\cli\lib\index.js:112:9)
micha@DESKTOP-P5RTAG7 MINGW64 ~/repos/botshops (master)
$ amplify status
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | ---------------- | --------- | ----------------- |
| Auth | botshopsff8e5633 | No Change | awscloudformation |
| Api | botshops | No Change | awscloudformation |
【问题讨论】:
-
如果没有看到您如何配置未经身份验证的角色以及是否启用了未经身份验证的访问,将很难说什么。
标签: amazon-s3 amazon-cognito aws-amplify