How do I setup email configuration for aws cognito user pools?

元气小坏坏 提交于 2019-12-04 07:33:24

I just went through the same ordeal and finally figured it out. AWS has horrible documentation on this. Sharing my experience to hopefully help you and/or others.

1.) You'll need to verify the email you want to send from in SES.

2.) Once you verify the email, you are able to click on it in the SES dashboard and see it's Identity ARN (e.g., arn:aws:ses:us-west-2:MY-AWS-ACCOUNT-NUMBER:identity/admin@example.com). This Identity ARN is what you'll use in the CloudFormation above for SourceARN under EmailConfiguration.

3.) Once you click on the verified email in the SES dashboard, you'll have the option to set Identity Policies. Add this snippet there (replacing the Resource ARN below with the correct Identity ARN you grabbed from step 2):

{
    "Version": "2008-10-17",
    "Statement": [
        {
             "Sid": "stmnt1234567891234",
             "Effect": "Allow",
             "Principal": {
                "Service": "cognito-idp.amazonaws.com"
             },
             "Action": [
                 "ses:SendEmail",
                 "ses:SendRawEmail"
             ],
             "Resource": "arn:aws:ses:us-west-2:<MY-AWS-ACCOUNT-NUMBER>:identity/admin@example.com"
         }
     ]
 }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!