javascript - AWS 文档示例 : Clarification

标签 javascript amazon-web-services amazon-cognito

我(仍在)尝试将 AWS cognito 实现到我的应用程序中(ionic 2-3)。在 aws 给出的各种示例中,他们使用了他们没有描述/解释/告诉我它来自哪里的变量。变量为“AWS”或“AWSCognito”

here

AWS.config.region = this.config.get('region')

here

AWSCognito.config.region = 'us-east-1';

它们来自哪里(进口?但是是哪一个?)
我该如何定义它们?

最佳答案

几周前我也有同样的疑问,并对此进行了搜索...我发现这篇文章解释了我们到底如何使用 AWS Cognito with Node.js

观测: This如果您想这样做,本文使用 AWS 的官方模块。

您可以使用以下方法设置区域:

var AWS = require('aws-sdk');
var AWS_Region = 'us-east-1';
AWS.config.region = AWS_Region;

查看更多有关using AWS Cognito with Node.js的信息.

关于javascript - AWS 文档示例 : Clarification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46889011/

相关文章:

javascript - 将数组拆分为两个数组

amazon-web-services - AWS EC2 实例登录失败

amazon-web-services - 如何使用 aws cognito 跨应用程序共享 session 以在设备上实现无缝用户体验?

amazon-web-services - AWS 云形成 : Cognito LambdaTrigger CustomEmailSender - Property "Not currently supported by AWS CloudFormation." and CDK usage

android - 登录不匹配。请为此身份或身份池至少提供一个有效登录名

javascript - 悬停父div时,更改子div的背景色

javascript - CSS transitions - 在不改变时间的情况下改变一个属性

javascript - 在 Javascript 中,如何在不更改函数的情况下检查函数是否处于严格模式*?

asp.net - DynamoDB 全局二级索引的一致性读取

python - 在 AWS 的 DynamoDB 表中设置列的顺序