问题标签 [amazon-mobile-hub]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
784 浏览

amazon-web-services - 当放置在 S3 存储桶中时,让 AWS Rekognition 读取图像的问题

试图让 AWS Rekognition 为我上传到 S3 的图像添加标签时真的陷入了困境。我仍在学习如何获得正确的角色和访问权限(我已将“所有”Rekognition 服务作为内联策略添加到我在 IAM 中的所有角色中,我正在构建这个应用程序以获得一些 AWS 的实践经验。

以下是所有代码(为混乱的代码道歉 - 仍在学习)。下面是我在 Lambda 中运行的测试的输出。

有人可以帮助建议我做错了什么以及如何进行一些调整以使 Rekognition 能够扫描图像并使用列出图像中的内容(例如,人、树、汽车等)。提前致谢!!!

来自 Lambda 的测试输出。另请注意,我的 S3 存储桶与我的 Lambda 函数位于同一区域:

0 投票
1 回答
239 浏览

reactjs - 使用 AWS Mobile hub 和 AWS Amplify 进行舞台管理

我目前正在编写一个 Web 应用程序,并且正在使用 AWS Amplify。

我在使用 Amplify 之前创建了我的 API Gateway 和我的 lambda,因此我将现有的 API 导入到 Mobile Hub。

我的 API 网关有 2 个阶段 dev 和 prod。

根据 Amplify 文档,这里是从我的应用程序调用我的 API 的代码。

apiName 由 Mobile Hub 自动生成,并且始终为 ...amazonaws.com/dev 路径将是 /items 例如

导致调用 ...amazonaws.com/dev/items

我在 Amplify 或 AWS 文档中没有看到任何能够使用 Amplify 库调用 ...amazonaws.com/prod/items 的内容。

我试图编辑mobile-hub-project.yml并更改它:

至 :

并推送新配置,但行为仍然相同。

谁能帮助我使用 Amplify 管理多个阶段?

0 投票
1 回答
81 浏览

android - How to add better validation feedback to Android app using com.amazonaws.mobile.auth.userpools Class SignUpActivity and SignInUI

The code below is used display an AWS Android sign-in dialog that includes an option to allow users to register ("Create New Account") within an Android app (similar for iPhone too). The validation is poor.

Users are displayed a generic failure dialog and returned to the login page with an error returned from AWS (often too technical and limited to the first error on the form). The error dialog only validates one field at a time. Users are forced back to the sign-in page and must re-enter all their information again.

Any single mistake or validation error will be rejected and the user returned to the sign-in page and required to re-enter all their information again. Tedious and poor UX design.

Is there a way to improve or tap into the UX and still use the AWS? Anyone know of Amazon plans to improve this? The long fix is to not use the classes and write all the login and account creation from scratch, but I'd rather focus on the core app features than invest time in login dialogs, for now at least. Some users have simply uninstalled the app when trying to create an account because it is too tedious.

The UX looks like this: https://docs.aws.amazon.com/aws-mobile/latest/developerguide/images/tutorial-notes-authentication-anim.gif From AWS documentation

Example Create New Account Feedback

0 投票
1 回答
76 浏览

swift - 如何通过移动集线器和 Swift 设置 DynamoDB 表?

我正在尝试通过移动集线器和 Swift 制作一张表格,如下面的视频所示。 https://www.youtube.com/watch?v=mvDzfqMk5T4&t=323s

但我不知道应该为 Swift 的数据类型选择哪种类型的属性。

我想要做的是制作一个表格,其中包含像这个结构的元素和用户 ID 这样的项目。

那么表格的行应该是这样的。

但是这种颜色是数据类型,所以我不知道该选择哪种类型的属性。

有人可以帮忙吗?

此外,这个结构是可编码的,那么有没有办法通过 JSON 处理 DynamoDB 和移动集线器?我目前正在关注上面的视频,但如果可能的话,这听起来很方便。

0 投票
1 回答
66 浏览

android - 带有附加集的 aws mobilehub no-sql 批量更新

我正在尝试通过 android 应用程序更新 dynamodb 中两个不同表的字段的属性。经过大量搜索后,我发现了这个:-

此功能正常工作,但在“更新”配置中,即删除字段中的所有其他属性,只留下更新的属性。但我希望它处于“APPEND_SET”配置中,即所有不应该更新的属性也保留在该字段中。

在处理单表更新(即不是批处理)时,我使用“SET_APPEND”配置成功更新了字段,如下所示:-

但这在 batchSave 的情况下不起作用。

这是我的代码:-

这会产生错误:-