Docs

Email behavior and limits

Email sends from the customer's own domains through SES in their AWS account, and never replaces mail routing they already have. It's available only on AWS.

Guarantees

The customer's domains and reputation. Mail is sent through SES in the customer's AWS account, from domains they own. Sending reputation, quotas, and deliverability belong to that account: there is no shared sending pool.

Easy DKIM on every seed domain. Each seed identity is created with Easy DKIM signing and the configuration set attached. SES verifies the domain once the three CNAME records exist in DNS.

Runtime identities survive the stack. Identities created through email/manage-identities are app data. The deployment doesn't track them, and deleting the stack doesn't remove them.

Seed domains are different: removing one from domains deletes its identity and its DKIM verification state.

Catch-all inbound with scanning. The receipt rule has no recipient filter, so mail for any identity the account receives mail for lands in the bucket without a stack change. Spam and virus scanning are on.

Existing mail routing is never replaced. Initial setup refuses to activate its receipt rule set if another rule set is already active in the account and region, so your deployment can't break mail the customer already receives through SES.

Complete event coverage. With .events(), SES publishes send, delivery, bounce, complaint, delivery-delay, and reject events for all mail sent through the configuration set.

Limits

LimitValueNotes
Resource id[A-Za-z0-9-_], up to 64 charactersImmutable after create.
Seed domainsUniqueListing a domain twice fails at initial setup.
Email resources with inbound1 per stack, and 1 per AWS account and regionSES allows one active receipt rule set per account and region.
Email resources per events queue1A queue has one effective policy, so two Email resources on one queue would overwrite each other's policy.
Inbound regionsSES receiving regions onlySES receives mail in a subset of AWS regions. Elsewhere, initial setup fails.
Linked Storage and QueueMust be frozenInitial setup wires them, and a live resource doesn't exist yet at that point.
New AWS accountsSES sandboxVerified recipients only, low quotas. Production access is a request to AWS.

Update semantics

Email is frozen, so changes take effect only when the customer's admin runs initial setup again. Ongoing management doesn't apply them.

  • domains. Adding a domain creates a new identity. Removing one deletes its identity and DKIM verification state. The list may be empty.
  • .inbound() and .events(). Can be added, removed, or pointed at another resource. Removing them tears down the receipt rule set or the event destination.
  • id. Immutable.

Inbound activation

SES allows one active receipt rule set per account and region, and CloudFormation has no resource that activates one. Initial setup adds a small function that runs when the stack is created, updated, and deleted:

  • Create and update. If no rule set is active, it activates this stack's rule set. If another rule set is active, initial setup fails with an error naming it, and existing routing isn't modified. To recover, pick an unused region, or deactivate the existing rule set on purpose and retry.
  • Delete. If this stack's rule set is still the active one, it deactivates it.

The rule set name is in the resource outputs as ruleSetName. Every 5 minutes, Alien checks that it's still the active rule set.

If someone changed SES routing in the account, the resource reports unhealthy, instead of looking healthy while mail no longer reaches the bucket.

What initial setup provisions

  • One AWS::SES::ConfigurationSet, named after the stack and resource id.
  • Per seed domain, an AWS::SES::EmailIdentity with Easy DKIM and the configuration set attached.
  • With .events(): a configuration set event destination publishing to an SNS topic, subscribed to the linked SQS queue with raw delivery, plus the queue policy that lets the topic send.
  • With .inbound(): a receipt rule set and a catch-all rule whose S3 action writes to the linked bucket, plus the bucket policy statement that lets SES write. With .events() too, the S3 action also publishes the receipt notification to the topic.
  • With .inbound(): the Python function that activates the rule set.
  • IAM policies attaching the granted email/* permission sets to the workload roles.

Design decisions

Infrastructure, not domain lifecycle. The resource owns the configuration set and the event and inbound wiring. Email products usually create identities through the API when a customer adds a domain, so the domain lifecycle belongs to the app.

Seed domains are for domains you need from the first deployment, and for products with a fixed set of domains.

No domain list in the binding. Identities come and go at runtime, so a list fixed at initial setup would go stale.

No Alien send API. Every backend is SES. Wrapping the SDK would add a layer without adding portability.

Frozen only. Email holds durable routing state: identities, DKIM verification, and receipt rules. Only initial setup creates and changes it.

On this page