SES Send Email fails with permission denied

I’m facing the same issue as the one posted here:

Lambda function:
https://calendar.luptico.com/.netlify/functions/send-email

code can be found here:
https://github.com/garciadiazjaime/website-calendar/blob/main/netlify/functions/send-email.js

error

{
status: "NOT_SEND",
message: "AccessDenied: User `arn:aws:iam::117428681856:user/valle' is not authorized to perform `ses:SendEmail' on resource `arn:aws:ses:us-east-1:117428681856:identity/*****@****.com'",
}

is there a way to add ses:SendEmail permission to the lambda function?

Thanks.

Hey @Mint_IT_Media,

Since Netlify Functions run on AWS in Netlify’s AWS accounts, I don’t think this is supposed to work. I haven’t checked the AWS docs, but unless they provide a way to specify which account to use SES from, this would not work.

If AWS doesn’t provide a way to do that, on the Enterprise plan, we allow users to deploy Netlify Functions to their own AWS account where you can manage this setting yourself.

got it, thanks for answering!