简体   繁体   English

Cognito SMS Auth 到不同地区的 SNS

[英]Cognito SMS Auth to SNS in a different region

I have a Cognito set up in eu-central-1 and now I need SMS MFA to be activated in Cognito.我在 eu-central-1 中设置了 Cognito,现在我需要在 Cognito 中激活 SMS MFA。 AWS docs tells me that Cognito will send SMS through AWS SNS however, the SNS in region eu-central-1 does not have SMS availability. AWS 文档告诉我,Cognito 将通过 AWS SNS 发送 SMS,但是,eu-central-1 区域的 SNS 不支持 SMS。

I now have an SNS in a different region (us-east-1) with an SMS limit of $1000 but how can I connect the Cognito in eu-central-1 to send sms through SNS in us-east-1?我现在在不同地区 (us-east-1) 有一个 SNS,短信限额为 1000 美元,但我如何连接 eu-central-1 中的 Cognito 以通过 us-east-1 中的 SNS 发送短信? Is it even possible or would I have to move my Cognito to us-east-1?是否有可能或者我必须将我的 Cognito 移动到 us-east-1?

The Cognito role has the relevant permission to access/publish through SNS. Cognito 角色具有通过 SNS 访问/发布的相关权限。

According to the Cognito Developer Guide :根据Cognito 开发人员指南

SMS messages from Amazon Cognito user pools are routed through Amazon SNS in the same region unless noted in the following table.除非下表中另有说明,否则来自 Amazon Cognito 用户池的 SMS 消息将通过同一区域中的 Amazon SNS 进行路由。

Amazon Cognito Region Amazon Cognito 区域 Supported SNS Regions支持的 SNS 区域
US East (Ohio) us-east-2美国东部(俄亥俄州) us-east-2 us-east-1我们-东-1
Asia Pacific (Mumbai) ap-south-1亚太地区(孟买)ap-south-1 ap-southeast-1 ap-southeast-1
Asia Pacific (Seoul) ap-northeast-2亚太地区(首尔)ap-northeast-2 ap-notheast-1 ap-notheast-1
Canada(Central) ca-central-1加拿大(中部)ca-central-1 us-east-1我们-东-1
Europe (Frankfurt) eu-central-1欧洲(法兰克福) eu-central-1 eu-west-1 eu-west-1
Europe (London) eu-west-2欧洲(伦敦)eu-west-2 eu-west-1 eu-west-1

Check the docs for the latest but eu-central-1 gets routed through eu-west-1 at the time I'm writing this.检查文档以获取最新信息,但在我撰写本文时, eu-central-1通过eu-west-1路由。 I came across this with my deployment in us-east-2 which gets routed through us-east-1 .我在us-east-2中的部署遇到了这个问题,该部署通过us-east-1路由。

Yes, it is possible to connect a aws-cognito-userpool from eu-central-1 with aws-sns Text messaging (SMS) in eu-west-1 .是的,可以将eu-central-1 eu-west-1 -1 中的 aws-sns Text messaging (SMS)连接起来。 They don't have to be in the same region.他们不必在同一地区。

However aws now offers sending sms via eu-central-1 and explicitly asks to maintain isolation of regions.然而,aws 现在提供通过eu-central-1发送短信并明确要求保持区域隔离。

https://aws.amazon.com/blogs/security/amazon-cognito-launches-support-for-in-region-integration-with-amazon-ses-and-amazon-sns/ https://aws.amazon.com/blogs/security/amazon-cognito-launches-support-for-in-region-integration-with-amazon-ses-and-amazon-sns/

  1. switch to the new interface (displayed at top: The new design for Cognito User Pools console is now available. Try out the new interface )切换到新界面(显示在顶部: The new design for Cognito User Pools console is now available. Try out the new interface
  2. select user pool select 用户池
  3. go to tab Messaging go 到选项卡Messaging
  4. Section SMS and Edit部分SMSEdit
  5. select region from dropdown at section SNS Region select 区域来自SNS Region部分的下拉列表

There is a screen to configure this for your AWS Cognito.有一个屏幕可以为您的 AWS Cognito 进行配置。

  1. Navigate to AWS Cognito -> Manage user pool导航到 AWS Cognito -> 管理用户池
  2. Select the User Pool where notification has to be configured. Select 必须配置通知的用户池。
  3. Navigate to the section 'Message Customizations'导航到“消息自定义”部分
  4. Choose the SES Region where it is configured in your account and fill the remaining fields.选择在您的账户中配置的 SES 区域并填写剩余字段。
  5. In the option 'Do you want to send emails through your Amazon SES Configuration?'在“您想通过您的 Amazon SES 配置发送电子邮件吗?”选项中choose 'Yes - Use Amazon SES'.选择“是 - 使用 Amazon SES”。
  6. Go to bottom and save the changes (make necessary changes in other fields according to your requirement.) Go 到底部并保存更改(根据您的要求在其他字段中进行必要的更改。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM