【发布时间】:2020-08-14 15:16:53
【问题描述】:
我正在尝试通过 Amplify SDK 将 Pinpoint Analytics 实施到现有的 React Native 应用程序中。我们有一个现有的用户群和我们自己的 authN 和 authZ 实现,所以我们不需要(更重要的是,买不起)Cognito 用户池。
一方面,Pinpoint API 在recording events 时不需要与 Cognito 进行任何集成,但在使用 analytics 时,amplify documentation 似乎需要 auth 插件,而在配置时需要 auth 参数放大。
Amplify.configure({
// To get the AWS Credentials, you need to configure
// the Auth module with your Cognito Federated Identity Pool
Auth: {
identityPoolId: 'us-east-1:xxx-xxx-xxx-xxx-xxx',
region: 'us-east-1'
},
Analytics: {
// OPTIONAL - disable Analytics if true
disabled: false,
...
有没有办法通过 Amplify 使用analytics 而不生成用户池?我试过检查 AWS 移动 SDK,但它们显然已被弃用,现在大多数文档都指向 Amplify。我们可以直接使用 Pinpoint API,但这种实现似乎有点多余。
【问题讨论】:
标签: aws-amplify aws-pinpoint aws-amplify-cli