0
votes

I use SNS to send confirmation codes for signing up with Cognito. Initially, it all worked great, with a $10 spending limit on us-east-1(N Virginia). After some card issues, my spening limit got reduced to $1 and it was already reached. After requesting a spending limit increase, Amazon increased my spending limit on Amazon SNS us-east-2(Ohio). My issue is that now Cognito tries to send messages using the Virginia server instead of the Ohio one, resulting in failed attempts.

I would like to switch SNS servers or maybe disable us-east-1 to fix this issue.

I'd appreciate any info on the matter.

Thanks in advance.

1

1 Answers

0
votes

https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html

SMS messages from Amazon Cognito user pools are routed through Amazon SNS in the same region unless noted in the following table.

There is no way to change this internal mapping. Ideally the easiest way is to increase the SNS spending limit in the us-east-1 region. Not sure why you got it in the us-east-2 region.. maybe you could explain further on that.

Another option is to use this new feature: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html

It is a new Lambda trigger which is not available in the console but can be added in the CLI. You could use the AWS SDK to send the CODEs via SNS in the given region. I have not done this myself but should satisfy your usecase.