SES IAM Policies
Send email from a specific domain
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SendEmailFromDomain",
"Effect": "Allow",
"Action": ["ses:SendEmail", "ses:SendRawEmail"],
"Resource": "*",
"Condition": {
"StringLike": {
"ses:FromAddress": "*@${Domain}"
}
}
}
]
}
data "aws_iam_policy_document" "send_email_domain" {
statement {
sid = "SendEmailFromDomain"
effect = "Allow"
resources = ["*"]
actions = [
"ses:SendEmail",
"ses:SendRawEmail",
]
condition {
test = "StringLike"
variable = "ses:FromAddress"
values = ["*@${Domain}"]
}
}
}