SES will send your bulk mail and refuse your receipts
Simple content and raw MIME are two different IAM actions, so bulk went out while every transactional message carrying an inline logo was denied.
Bulk email was sending. Transactional email was not. Same account, same region, same verified identity, same code path as far as anyone had looked. The only difference between the two was a logo.
Two actions behind one feature
The AWS SDK exposes one SendEmail call, and that hides the shape of the permission underneath it. When you pass Content.Simple, SES authorises the request against ses:SendEmail. When you pass Content.Raw, which is what you need the moment a message carries its own MIME structure, it authorises against ses:SendRawEmail.
Our policy granted the first and not the second. Bulk mail is plain, so it sent. Every receipt had an inline logo, so it was built as raw MIME, so it was denied at the identity.
await ses.send(
new SendEmailCommand({
FromEmailAddress: from,
Destination: { ToAddresses: [to] },
// simple content authorises against ses:SendEmail
Content: { Simple: { Subject: subject, Body: body } }
})
);
await ses.send(
new SendEmailCommand({
FromEmailAddress: from,
Destination: { ToAddresses: [to] },
// raw mime authorises against ses:SendRawEmail
Content: { Raw: { Data: mime } }
})
);Why the error did not say so
The denial names the first action it refuses, not every action the call path could need. We had already been through one round of this: the configuration set ARN was missing from the policy, we added it, bulk started working, and we read that as the fix. It was half the fix, and the half that was still broken was the half customers actually see.
The rule I now follow
Before handing anyone a permission edit, enumerate every action the code path calls, derived from the call the code actually makes, content mode included. Not from the error text. The error text is a single sample from a set you have not enumerated yet.
That one reading of the send call would have saved two round trips.
※