Hello,
I've searched on re:Post but could not find a similar case. I am using AWS-SDK together with NodeJS to send automated mails upon form submit on my website. The e-mail address and domain are verified and out of sandbox. The mailing works when I execute in development mode locally, but not online on production. I have ensured that the env variables are included on Amplify. The code prior to sending the SendMail:
let AWS = require("aws-sdk");
AWS.config.update({
accessKeyId: process.env.KEY_ID,
secretAccessKey: process.env.KEY_SECRET,
region: process.env.REGION_ID,
});
I have applied the ses:Sendmail allow policy in IAM to the user linked to above key/secret. Am I missing something? The shared credentials file is not needed for deployed production if I have the above .config.update right? The policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ses:SendRawEmail",
"ses:SendEmail"
],
"Resource": "*"
}
]
}
Thank you so much.