Lambda Functions
ServerlessInbox runs on a set of purpose-built Lambda functions. They are grouped below by functional area.
Reading the tables
Section titled “Reading the tables”Values that CloudFormation resolves at deployment time are shown in ${…} placeholders
rather than as literal strings, because they differ per deployment:
| Notation | Meaning |
|---|---|
${AWS::AccountId}, ${AWS::Region}, ${AWS::Partition}, ${AWS::StackName}, ${AWS::StackId} | The CloudFormation pseudo-parameters of your deployment |
${SomeLogicalId.SomeAttribute} | An attribute of another resource in the same stack, resolved at deploy time |
${Select(…)}, ${Split(…)} | A value CloudFormation computes from the values it encloses |
Everything else is literal — in particular, a * is a real wildcard in the granted ARN and
is shown exactly where the policy has one. Where a statement carries IAM conditions, they
are listed beside it; a grant that looks broad in its Actions or Resources column is often
narrowed to this stack’s resources by a tag condition, and the condition is the part that does
the narrowing.
Environment variables marked resolved at deploy time take their value from a stack parameter or another resource, and the template does not carry a literal for them.
API & Request Handling
Section titled “API & Request Handling”These Lambdas handle synchronous HTTP and authentication requests.
jmap-api
Section titled “jmap-api”The core user-facing API. Implements the JMAP protocol for email read, write, thread, search, and submission. Sits behind HTTP API Gateway and is used by the Webmail UI and any JMAP-capable email client. Full-text search runs in-process here via a CGO bridge to Tantivy, reading each account’s search index directly from the Email bucket — see Search Architecture.
Trigger: HTTP API Gateway
Environment variables (16)
| Variable | Value |
|---|---|
API_BASE_URL | resolved at deploy time |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CDN_HOST | resolved at deploy time |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
EMAIL_SUBMISSION_QUEUE_URL | resolved at deploy time |
IDENTITY_PROVISIONER_FUNCTION_NAME | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
OAUTH_HANDLER_CONFIG | {"scopeMap":{"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]}} |
OAUTH_PROTECTED_RESOURCE_URL | resolved at deploy time |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
SERVICE_NAME | jmap-api |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
WEBSOCKET_URL | resolved at deploy time |
AWS resource access (18 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = TENANT#*#ACCOUNT#*ForAllValues:StringEquals dynamodb:Attributes = pk, sk, activeSieveScriptIdForAllValues:StringEquals dynamodb:ReturnValues = NONE |
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = hmac |
dynamodb:GetItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = TENANT#*PAT_OWNER#* |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
s3:DeleteObjects3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
s3:ListBucket | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn} | StringLike s3:prefix = tenants/*/accounts/*/emails/* |
s3:DeleteObjects3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/uploads/* | — |
s3:DeleteObjects3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/contacts/* | — |
s3:DeleteObjects3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/sieve/* | — |
s3:DeleteObjects3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/principals/* | — |
s3:GetObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/search-indexes/* | — |
sqs:SendMessage | ${mailboxemailemailsendingemailsubmissionsqueueC553C8C2.Arn} | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
lambda:InvokeFunction | ${mailboxauthidentityprovisionerD2F3DDF7.Arn}${mailboxauthidentityprovisionerD2F3DDF7.Arn}:* | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/grant-resourcearn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/revoke-resource | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
admin-api
Section titled “admin-api”The administrative backend. Handles tenant management, user provisioning, domain and identity configuration, audit log queries, suppression list management, and addon operations. Used exclusively by the Admin UI and programmatic admin tooling.
Trigger: HTTP API Gateway
Environment variables (19)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUDIT_LOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn))))} |
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
EMAIL_SUBMISSION_QUEUE_URL | resolved at deploy time |
IDENTITY_PROVISIONER_FUNCTION_NAME | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
MAIL_FEEDBACK_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn))))} |
MAIL_LOG_TABLE_NAME | resolved at deploy time |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
ROOT_STACK_ID | ${Select(2, Split("/", AWS::StackId))} |
SERVICE_NAME | admin-api |
SES_CONFIG_SET_NAME | resolved at deploy time |
SES_RULE_SET_NAME | resolved at deploy time |
STACK_IDENTITY_TAG_KEY | serverless-inbox:root-stack |
STACK_IDENTITY_TAG_VALUE | resolved at deploy time |
SYSTEM_SENDER_ADDRESS | resolved at deploy time |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (28 statements)
| Actions | Resources | Conditions |
|---|---|---|
lambda:GetAccountSettingssts:GetCallerIdentity | * | — |
ses:CreateEmailIdentityses:DeleteEmailIdentityses:GetEmailIdentityses:PutEmailIdentityDkimSigningAttributes | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/* | — |
ses:TagResource | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/* | StringEquals aws:RequestTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringEquals aws:TagKeys = serverless-inbox:root-stack, serverless-inbox:root-stack-id |
ses:TagResource | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/* | StringEquals aws:RequestTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:RequestTag/serverless-inbox:root-stack-id = trueForAllValues:StringEquals aws:TagKeys = serverless-inbox:root-stack, serverless-inbox:root-stack-id |
ses:SendEmail | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/*arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:configuration-set/${mailboxemailseseventprocessingsesconfigurationsetC81015C1} | — |
ses:GetAccountses:GetSendStatisticsses:ListEmailIdentities | * | — |
route53:ChangeResourceRecordSets | arn:${AWS::Partition}:route53:::hostedzone/* | ForAllValues:StringLike route53:ChangeResourceRecordSetsNormalizedRecordNames = *._domainkey.*, _dmarc.*ForAllValues:StringEquals route53:ChangeResourceRecordSetsRecordTypes = CNAME, TXTForAllValues:StringEquals route53:ChangeResourceRecordSetsActions = UPSERT, DELETENull route53:ChangeResourceRecordSetsNormalizedRecordNames = ${false}Null route53:ChangeResourceRecordSetsRecordTypes = ${false}Null route53:ChangeResourceRecordSetsActions = ${false} |
route53:ChangeResourceRecordSets | arn:${AWS::Partition}:route53:::hostedzone/* | ForAllValues:StringEquals route53:ChangeResourceRecordSetsRecordTypes = MX, TXTForAllValues:StringEquals route53:ChangeResourceRecordSetsActions = UPSERT, DELETENull route53:ChangeResourceRecordSetsRecordTypes = ${false}Null route53:ChangeResourceRecordSetsActions = ${false} |
route53:ListResourceRecordSets | arn:${AWS::Partition}:route53:::hostedzone/* | — |
route53:ListHostedZonesByName | * | — |
servicequotas:ListServiceQuotasservicequotas:RequestServiceQuotaIncrease | * | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/grant-resourcearn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/revoke-resource | — |
ses:DescribeActiveReceiptRuleSet | * | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn}/index/* | — |
dynamodb:GetItemdynamodb:Query | ${mailboxemailmaillogtable788E1311.Arn}${mailboxemailmaillogtable788E1311.Arn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
dynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn}/index/gsi1 | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
s3:DeleteObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/sieve/* | — |
s3:ListBucket | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn} | StringLike s3:prefix = tenants/*/accounts/*/sieve/* |
sqs:SendMessage | ${mailboxemailemailsendingemailsubmissionsqueueC553C8C2.Arn} | — |
lambda:InvokeFunction | ${mailboxauthidentityprovisionerD2F3DDF7.Arn}${mailboxauthidentityprovisionerD2F3DDF7.Arn}:* | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
authorizer-jmap-api
Section titled “authorizer-jmap-api”A JWT authorizer invoked by API Gateway before routing a request to jmap-api. Validates the
bearer token against the cached public keys, then enforces the audience, scope, and group
requirements configured for the JMAP API.
Trigger: API Gateway Lambda authorizer (JMAP API)
Environment variables (9)
| Variable | Value |
|---|---|
ALLOW_ANONYMOUS_ROUTES | GET /.well-known/jmap |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
AUTH_POLICY_NAME | JMAP_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_SCOPE_MAP | {"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]} |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
PRINCIPAL_LOOKUP | off |
SERVICE_NAME | authorizer-jmap-api |
AWS resource access (5 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = jwks |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:GetItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#* |
dynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#*ForAllValues:StringEquals dynamodb:Attributes = pk, sk, lastUsedAt |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
user-api
Section titled “user-api”Serves the User API at /user: per-user settings that follow the account, currently the webmail
theme and language. Every signed-in user can read and change their own; nothing here is
administrative.
Trigger: HTTP API Gateway
Environment variables (13)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
BLOB_STORAGE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
IMPORT_JOBS_QUEUE_URL | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
MAIL_IMPORT_RUNNER_FUNCTION_NAME | resolved at deploy time |
OAUTH_HANDLER_CONFIG | {"scopeMap":{"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]}} |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
SERVICE_NAME | user-api |
SYSTEM_SENDER_ADDRESS | resolved at deploy time |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (12 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = connection-key-public |
sqs:SendMessage | ${mailboxjobsimportjobsqueue2310C747.Arn} | — |
lambda:InvokeFunction | ${mailboxjobsmailimportrunnerB153C54B.Arn}${mailboxjobsmailimportrunnerB153C54B.Arn}:* | — |
dynamodb:ConditionCheckItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn} | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:PutItemdynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | — |
dynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn}/index/gsi1 | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
authorizer-user-api
Section titled “authorizer-user-api”The JWT authorizer in front of the User API. It enforces the same audience, scope and group requirements as the JMAP API.
Trigger: API Gateway Lambda authorizer (User API)
Environment variables (9)
| Variable | Value |
|---|---|
ALLOW_ANONYMOUS_ROUTES | “ |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
AUTH_POLICY_NAME | JMAP_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_SCOPE_MAP | {"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]} |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
PRINCIPAL_LOOKUP | off |
SERVICE_NAME | authorizer-user-api |
AWS resource access (5 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = jwks |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:GetItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#* |
dynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#*ForAllValues:StringEquals dynamodb:Attributes = pk, sk, lastUsedAt |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
authorizer-admin-api
Section titled “authorizer-admin-api”The JWT authorizer in front of the Admin API’s own endpoint, configured independently of the JMAP authorizer — its own audience, scope, and authorization group requirements.
Trigger: API Gateway Lambda authorizer (Admin API)
Environment variables (9)
| Variable | Value |
|---|---|
ALLOW_ANONYMOUS_ROUTES | “ |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
AUTH_POLICY_NAME | ADMIN_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_SCOPE_MAP | {"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]} |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
PRINCIPAL_LOOKUP | off |
SERVICE_NAME | authorizer-admin-api |
AWS resource access (5 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = jwks |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:GetItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#* |
dynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = PAT#*ForAllValues:StringEquals dynamodb:Attributes = pk, sk, lastUsedAt |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
authorizer-admin-api-lookup
Section titled “authorizer-admin-api-lookup”Authorizes the routes that Admin API addons add. Resolves the caller’s principal, passes it on to the addon, and blocks a request that has none.
Trigger: API Gateway Lambda authorizer (Admin API addon routes)
Environment variables (7)
| Variable | Value |
|---|---|
ALLOW_ANONYMOUS_ROUTES | “ |
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
AUTH_POLICY_NAME | ADMIN_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_SCOPE_MAP | {"si/mail.read":["mail/readItems"],"si/mail.write":["mail/addItems","mail/removeItems","mail/setSeen","mail/setKeywords","mail/createChild","mail/rename","mail/delete","import/read","import/write"],"si/mail.send":["mail/submit"],"si/account.read":[],"si/alias.read":[],"si/alias.write":[],"si/user.read":["preferences/read"],"si/preferences.read":["preferences/read"],"si/preferences.write":["preferences/write"],"si/contacts.read":["contacts/read"],"si/contacts.write":["contacts/write","contacts/delete"],"si/sieve.read":["sieve/read"],"si/sieve.write":["sieve/write"],"si/admin":["admin"],"si/tokens.manage":["tokens/manage"],"si/push.manage":["push/manage"]} |
PRINCIPAL_LOOKUP | on |
SERVICE_NAME | authorizer-admin-api-lookup |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = jwks |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
idp-token-exchange-admin-ui
Section titled “idp-token-exchange-admin-ui”Handles token federation for the Admin UI — exchanging a token issued by an external identity provider for one that satisfies the Admin API’s audience and scope requirements.
Trigger: HTTP API Gateway
Environment variables (5)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_POLICY_NAME | ADMIN_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_CLIENT_NAME | ADMIN_UI |
SERVICE_NAME | idp-token-exchange-admin-ui |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
idp-token-exchange-webmail-ui
Section titled “idp-token-exchange-webmail-ui”The same token exchange, deployed a second time for the Webmail UI. It is configured with the Webmail UI’s OAuth client and exchanges tokens for user-level rather than admin-level scope.
Trigger: HTTP API Gateway
Environment variables (5)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
AUTH_POLICY_NAME | JMAP_API |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
OAUTH_CLIENT_NAME | WEBMAIL_UI |
SERVICE_NAME | idp-token-exchange-webmail-ui |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
Email Processing
Section titled “Email Processing”These Lambdas handle the inbound and outbound email flows. See the Email Processing Pipeline and Email Sending Pipeline for full flow details.
ses-receipt-forwarder
Section titled “ses-receipt-forwarder”Receives inbound email receipt notifications from SES and forwards them to the email
processing queue, triggering the email-processor Lambda. Acts as the entry point for all
inbound email.
Trigger: SES receipt rule (activated by the bootstrap Lambda)
Environment variables (2)
| Variable | Value |
|---|---|
EMAIL_PROCESSOR_QUEUE_URL | resolved at deploy time |
SERVICE_NAME | ses-receipt-forwarder |
AWS resource access (1 statements)
| Actions | Resources | Conditions |
|---|---|---|
sqs:SendMessage | ${mailboxemailsesrulesemailprocessingqueue29F58F1E.Arn} | — |
email-processor
Section titled “email-processor”Processes raw incoming emails from the queue. Resolves the recipient to a tenant mailbox (handling plus-addressing and alias lookup), stores the message, records it in DynamoDB, and triggers real-time push notifications to connected WebSocket clients.
Trigger: SQS (email processing queue, fed by the SES receipt rule)
Environment variables (8)
| Variable | Value |
|---|---|
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
MAIL_LOG_TABLE_NAME | resolved at deploy time |
SERVICE_NAME | email-processor |
SYSTEM_SENDER_ADDRESS | resolved at deploy time |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (8 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
dynamodb:PutItem | ${mailboxemailmaillogtable788E1311.Arn} | — |
s3:DeleteObjects3:GetObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/incoming-emails/* | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
sqs:DeleteMessagesqs:GetQueueAttributessqs:ReceiveMessage | ${mailboxemailsesrulesemailprocessingqueue29F58F1E.Arn} | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
email-sender
Section titled “email-sender”Sends queued outbound email submissions. Fetches the stored MIME message, injects server-side signatures, tags the message, and dispatches it via SES.
Trigger: SQS (email submission queue)
Environment variables (7)
| Variable | Value |
|---|---|
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
SERVICE_NAME | email-sender |
SES_CONFIG_SET_NAME | resolved at deploy time |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (7 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
s3:GetObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
ses:SendRawEmail | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/*arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:configuration-set/${mailboxemailseseventprocessingsesconfigurationsetC81015C1} | — |
sqs:DeleteMessagesqs:GetQueueAttributessqs:ReceiveMessage | ${mailboxemailemailsendingemailsubmissionsqueueC553C8C2.Arn} | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
sqs-ses-event-processor
Section titled “sqs-ses-event-processor”Receives delivery feedback from SES — bounces, complaints, rejections, and delivery confirmations. Updates item state, records feedback, maintains the suppression list, and emits audit events.
Trigger: SQS (fed by SNS from the SES event destination)
Environment variables (8)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
MAIL_FEEDBACK_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn))))} |
SERVICE_NAME | sqs-ses-event-processor |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (8 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.mailFeedbackTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
sqs:DeleteMessagesqs:GetQueueAttributessqs:ReceiveMessage | ${mailboxemailseseventprocessingseseventqueueAC4EE0B2.Arn} | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
mail-import-runner
Section titled “mail-import-runner”Runs the mail imports users start from webmail (see Import Mail from Another Provider). It consumes the import jobs queue and copies mail from the old IMAP server into the destination account in batches, pushing a WebSocket state change after each saved batch so progress shows up live. It also serves the synchronous inspect call that checks a remote connection and lists its folders before an import is started.
Trigger: SQS (import jobs queue), plus a synchronous invoke to inspect a remote connection
Environment variables (9)
| Variable | Value |
|---|---|
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
BLOB_STORE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
IMPORT_JOBS_QUEUE_URL | resolved at deploy time |
IMPORT_MESSAGES_PER_SECOND | 5 |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
SERVICE_NAME | mail-import-runner |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (8 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
sqs:DeleteMessagesqs:GetQueueAttributessqs:ReceiveMessage | ${mailboxjobsimportjobsqueue2310C747.Arn} | — |
sqs:SendMessage | ${mailboxjobsimportjobsqueue2310C747.Arn} | — |
dynamodb:GetItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = connection-key-private |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
expiry-sweeper
Section titled “expiry-sweeper”Retires everything that has an expiry. Every 15 minutes it runs four passes: it ends running import jobs that have been stale for two hours and queued jobs that are overdue; it removes expired remote connections that have no active job; it warns the owners of personal access tokens that are about to expire and retires the tokens that have, once a day; and it removes expired push subscriptions. A problem in one pass does not hold up the others.
Trigger: EventBridge scheduled rule (every 15 minutes)
Environment variables (11)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
BLOB_STORAGE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
JOB_STALE_AFTER | 7200s |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
SERVICE_NAME | expiry-sweeper |
SWEEP_INTERVAL | 900s |
SYSTEM_SENDER_ADDRESS | resolved at deploy time |
WEBSOCKET_BROADCAST_FUNCTION_NAME | resolved at deploy time |
AWS resource access (8 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn}/index/gsi2 | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = TENANT#*PAT_OWNER#* |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
lambda:InvokeFunction | ${mailboxapisstatechangefanout4C9AB9B3.Arn}${mailboxapisstatechangefanout4C9AB9B3.Arn}:* | — |
Search
Section titled “Search”tantivy-indexer
Section titled “tantivy-indexer”Maintains per-account full-text search indexes. On each run, compares the changelog state recorded at the account’s last index build against the current changelog state; accounts with no changes are skipped, and accounts with changes get an incremental update — fetching changed items, updating the Tantivy index, and writing the updated archive back to S3. Runs with elevated memory to handle batch indexing efficiently. See Search Architecture for how this interacts with query-time search.
Trigger: EventBridge (scheduled rule, every 6 hours)
Environment variables (5)
| Variable | Value |
|---|---|
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
INDEX_BUCKET_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
SERVICE_NAME | tantivy-indexer |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
s3:GetObjects3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/search-indexes/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
WebSocket Push
Section titled “WebSocket Push”These four Lambdas together implement the real-time push channel. See the explanation pages for Email Processing and Email Sending for how push notifications are emitted.
websocket-connect
Section titled “websocket-connect”Invoked when a client opens a WebSocket connection, after the authorizer on the $connect route
has already validated the client’s token. It records the connection registration so the system
can push to it, and does nothing else — which is why it holds no access to the auth key store.
Trigger: WebSocket API Gateway ($connect route)
Environment variables (3)
| Variable | Value |
|---|---|
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
CONNECTIONS_TABLE_NAME | resolved at deploy time |
SERVICE_NAME | websocket-connect |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItemdynamodb:PutItem | ${mailboxapiswebsocketpushwebsocket2954CBE6.Arn} | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
websocket-disconnect
Section titled “websocket-disconnect”Invoked when a WebSocket connection closes, either by the client or due to timeout. Removes the stored connection registration.
Trigger: WebSocket API Gateway ($disconnect route)
Environment variables (2)
| Variable | Value |
|---|---|
CONNECTIONS_TABLE_NAME | resolved at deploy time |
SERVICE_NAME | websocket-disconnect |
AWS resource access (1 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:DeleteItemdynamodb:Query | ${mailboxapiswebsocketpushwebsocket2954CBE6.Arn} | — |
websocket-message
Section titled “websocket-message”Handles messages sent by connected clients over the WebSocket channel. A client subscribes by sending a message naming an account and the change types it wants; this function checks that the authenticated caller may access that account — as owner, through a direct grant, or via group membership — rejects requests asking for more types than the configured maximum, and records the subscription against the connection. It replies on the same connection with a confirmation, or with a structured error when the message is malformed, unauthorized or the account is unknown.
Trigger: WebSocket API Gateway (default route)
Environment variables (6)
| Variable | Value |
|---|---|
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
CONNECTIONS_TABLE_NAME | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
MAX_SUBSCRIPTIONS | 10 |
SERVICE_NAME | websocket-message |
WEBSOCKET_API_ENDPOINT | resolved at deploy time |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItemdynamodb:PutItem | ${mailboxapiswebsocketpushwebsocket2954CBE6.Arn} | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
execute-api:ManageConnections | arn:${AWS::Partition}:execute-api:${AWS::Region}:${AWS::AccountId}:${mailboxapiswebsocketpushwebsocketapi1D06C761}/prod/POST/@connections/* | — |
state-change-fanout
Section titled “state-change-fanout”Delivers state-change notifications for a given account. It pushes to all registered WebSocket
connections for the account and, when the tenant has JMAP PushSubscription registrations,
sends a StateChange POST to each confirmed subscription created by a user who can read the
account — encrypted when the subscription supplied keys. It also sends the one-time verification
request for a newly created subscription. Invoked directly (not via API Gateway) by other Lambdas
that record data changes — for example, after a new email arrives or a message is marked as read.
See Push Notifications & Real-Time Updates for the delivery
rules.
Trigger: Direct Lambda invocation (from email-processor, email-sender, sqs-ses-event-processor, jmap-api, admin-api)
Environment variables (6)
| Variable | Value |
|---|---|
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
CONNECTIONS_TABLE_NAME | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
PAT_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn))))} |
SERVICE_NAME | state-change-fanout |
WEBSOCKET_API_ENDPOINT | resolved at deploy time |
AWS resource access (7 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:Query | ${mailboxapiswebsocketpushwebsocket2954CBE6.Arn}${mailboxapiswebsocketpushwebsocket2954CBE6.Arn}/index/* | — |
dynamodb:DeleteItemdynamodb:Query | ${mailboxapiswebsocketpushwebsocket2954CBE6.Arn} | — |
execute-api:ManageConnections | arn:${AWS::Partition}:execute-api:${AWS::Region}:${AWS::AccountId}:${mailboxapiswebsocketpushwebsocketapi1D06C761}/prod/POST/@connections/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:DeleteItemdynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = TENANT#*#PUSH_SUB_OWNER#*, TENANT#*#PUSH_TENANT_COUNT |
dynamodb:GetItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.patTableArn} | ForAllValues:StringLike dynamodb:LeadingKeys = TENANT#*PAT_OWNER#* |
System & Lifecycle
Section titled “System & Lifecycle”These Lambdas handle deployment-time setup, background maintenance, and operational tasks.
bootstrap
Section titled “bootstrap”A CloudFormation custom resource that runs when the stack is created and when it is updated to a different release. Seeds the Config table with the platform configuration: OIDC provider settings, auth policies, OAuth client definitions, and API endpoint metadata. Other stack operations leave it untouched; it is designed to be idempotent. It also activates the SES receipt rule set if configured, registers the domain with SES, and configures hosted zone records if enabled.
Trigger: CloudFormation custom resource (on stack create/update)
Environment variables (9)
| Variable | Value |
|---|---|
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
ROOT_STACK_ID | ${Select(2, Split("/", AWS::StackId))} |
SERVICE_NAME | bootstrap |
SES_RECEIVING_MODE | on |
SES_RULE_SET_NAME | resolved at deploy time |
SES_SEND_ENABLED | on |
STACK_IDENTITY_TAG_KEY | serverless-inbox:root-stack |
STACK_IDENTITY_TAG_VALUE | resolved at deploy time |
AWS resource access (10 statements)
| Actions | Resources | Conditions |
|---|---|---|
iam:CreateServiceLinkedRole | * | StringEquals iam:AWSServiceName = servicequotas.amazonaws.com |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:GetItemdynamodb:PutItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = hmac |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/bootstraparn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/grant-resourcearn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/revoke-resource | — |
ses:DescribeActiveReceiptRuleSetses:SetActiveReceiptRuleSet | * | — |
route53:ChangeResourceRecordSetsroute53:GetHostedZone | arn:${AWS::Partition}:route53:::hostedzone/${hostedZoneId} | — |
ses:CreateEmailIdentityses:GetEmailIdentityses:PutEmailIdentityDkimSigningAttributes | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${hostedzoneresource87BCC632.domainName} | — |
ses:TagResource | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${hostedzoneresource87BCC632.domainName} | StringEquals aws:RequestTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringEquals aws:TagKeys = serverless-inbox:root-stack, serverless-inbox:root-stack-id |
ses:TagResource | arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${hostedzoneresource87BCC632.domainName} | StringEquals aws:RequestTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:RequestTag/serverless-inbox:root-stack-id = trueForAllValues:StringEquals aws:TagKeys = serverless-inbox:root-stack, serverless-inbox:root-stack-id |
cloudformation:DescribeStacks | ${AWS::StackId} | — |
identity-provisioner
Section titled “identity-provisioner”Provisions user identities when invoked by the Admin API or an identity provider webhook. Writes user records, provisions default mailboxes, records the creation event for auditing, and sends welcome emails via SES.
Trigger: Direct invocation (from admin-api or an IdP webhook)
Environment variables (10)
| Variable | Value |
|---|---|
ADMIN_UI_URL | resolved at deploy time |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
BLOB_STORAGE_NAME | ${Select(0, Split("/", Select(5, Split(":", mailboxdatadatadeployerresourceB59B417A.blobStoreArn))))} |
CHANGELOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn))))} |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
EMAIL_SUBMISSION_QUEUE_URL | resolved at deploy time |
ITEM_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn))))} |
SERVICE_NAME | identity-provisioner |
SES_CONFIG_SET_NAME | resolved at deploy time |
SYSTEM_SENDER_ADDRESS | resolved at deploy time |
AWS resource access (7 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.itemTableArn}/index/* | — |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.changelogTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
s3:PutObject | ${mailboxdatadatadeployerresourceB59B417A.blobStoreArn}/tenants/*/accounts/*/emails/* | — |
sqs:SendMessage | ${mailboxemailemailsendingemailsubmissionsqueueC553C8C2.Arn} | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/grant-resourcearn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/revoke-resource | — |
auth-key-store-updater
Section titled “auth-key-store-updater”Periodically fetches the JWKS (JSON Web Key Set) from the configured OIDC issuer and stores the
public keys in the auth key store table. This lets the API authorizers — and jmap-api itself —
validate JWTs locally without making an outbound call to the IdP on every request. WebSocket
connections are covered by the same keys: the $connect route is protected by the same
authorizer as the JMAP HTTP API, so the token is validated before the connect handler runs.
The outbound HTTPS call to each issuer’s discovery endpoint needs no IAM permission, so it does not appear in the access table below.
Trigger: EventBridge scheduled rule
Environment variables (3)
| Variable | Value |
|---|---|
AUTH_KEY_STORE_TABLE_NAME | resolved at deploy time |
ISSUERS | resolved at deploy time |
SERVICE_NAME | auth-key-store-updater |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:GetItemdynamodb:PutItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = hmac |
dynamodb:GetItemdynamodb:PutItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = jwks |
dynamodb:GetItemdynamodb:PutItem | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = connection-key-public |
dynamodb:DeleteItemdynamodb:PutItemdynamodb:Query | ${mailboxauthauthkeystore60D0E9D3.Arn} | ForAllValues:StringEquals dynamodb:LeadingKeys = connection-key-private |
audit-writer
Section titled “audit-writer”Consumes audit events from the shared audit SQS queue and writes them to the Audit log table. By routing audit writes through a queue, business-logic Lambdas can emit audit events fire-and-forget without blocking on persistence.
Trigger: SQS (audit events queue)
Environment variables (2)
| Variable | Value |
|---|---|
AUDIT_LOG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn))))} |
SERVICE_NAME | audit-writer |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.auditLogTableArn}/index/* | — |
sqs:DeleteMessagesqs:GetQueueAttributessqs:ReceiveMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
license-refresher
Section titled “license-refresher”Periodically fetches the vendor license status and updates the Config table. Allows the system to validate license tier, feature eligibility, and seat counts on a schedule.
Trigger: EventBridge scheduled rule
Environment variables (3)
| Variable | Value |
|---|---|
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
CORE_DOMAIN | resolved at deploy time |
SERVICE_NAME | license-refresher |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/refresh-license | — |
stack-failure-detector
Section titled “stack-failure-detector”Watches for the root stack’s terminal CloudFormation events and reports failures to the vendor. Triggered by stack status changes after deployment operations complete.
Trigger: EventBridge rule (CloudFormation stack status changes)
Environment variables (2)
| Variable | Value |
|---|---|
INFRA_LOG_GROUP_NAME | resolved at deploy time |
SERVICE_NAME | stack-failure-detector |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStackEventscloudformation:DescribeStacks | ${AWS::StackId} | — |
logs:CreateLogStreamlogs:PutLogEvents | ${sharedloggroupinfra0E6EFFD7.Arn} | — |
logs:FilterLogEvents | ${sharedloggroupinfra0E6EFFD7.Arn}arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:${sharedloggroupinfra0E6EFFD7} | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/issue-stack-failure-upload | — |
resource-sweeper-starter
Section titled “resource-sweeper-starter”Starts the async cleanup of retained resources (ACM certificates, Lambda@Edge functions, and stack-failure-detector resources) after stack deletion or update. Invoked via a CloudFormation custom resource, it kicks off the sweeper Step Functions state machine and does not perform any cleanup itself.
Trigger: CloudFormation custom resource (on stack delete/update)
Environment variables (2)
| Variable | Value |
|---|---|
MAILBOX_SWEEPER_STATE_MACHINE_ARN | resolved at deploy time |
SERVICE_NAME | resource-sweeper-starter |
AWS resource access (3 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
states:StartExecution | arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:stateMachine:mailbox-sweeper-867e750f-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
states:ListExecutionsstates:StopExecution | arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:stateMachine:mailbox-sweeper-867e750f-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
resource-sweeper-worker
Section titled “resource-sweeper-worker”Performs the individual resource cleanups the sweeper state machine schedules. This is the half of the sweeper pair that holds the delete permissions; they are tag-scoped to the resources of the root stack being swept.
Trigger: Step Functions state machine invocation (sweeper workflow)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | resource-sweeper-worker |
AWS resource access (18 statements)
| Actions | Resources | Conditions |
|---|---|---|
acm:DescribeCertificateacm:ListTagsForCertificate | arn:${AWS::Partition}:acm:${AWS::Region}:${AWS::AccountId}:certificate/* | — |
acm:DeleteCertificate | arn:${AWS::Partition}:acm:${AWS::Region}:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
acm:DeleteCertificate | arn:${AWS::Partition}:acm:${AWS::Region}:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
lambda:GetFunction | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | — |
lambda:DeleteFunction | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
lambda:DeleteFunction | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
events:DescribeRuleevents:ListTagsForResourceevents:ListTargetsByRule | arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:rule/* | — |
events:DeleteRuleevents:RemoveTargets | arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:rule/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
events:DeleteRuleevents:RemoveTargets | arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:rule/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
lambda:GetFunction | arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:* | — |
lambda:DeleteFunction | arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
lambda:DeleteFunction | arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
iam:ListRoleTags | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/mailbox-diag-role-*-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
iam:DeleteRoleiam:DeleteRolePolicy | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/mailbox-diag-role-*-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
iam:ListRoleTags | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/mailbox-sweeper-worker-*-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
iam:DeleteRoleiam:DeleteRolePolicy | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/mailbox-sweeper-worker-*-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
logs:CreateLogGroup | arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:${sharedloggroupinfra0E6EFFD7} | — |
logs:CreateLogStreamlogs:PutLogEvents | ${sharedloggroupinfra0E6EFFD7.Arn} | — |
Identity Provider & OAuth
Section titled “Identity Provider & OAuth”cognito-bootstrap-user
Section titled “cognito-bootstrap-user”A CloudFormation custom resource that creates the initial admin user in Cognito during stack deployment, so that there is an account able to sign in to the Admin UI.
Trigger: CloudFormation custom resource (on user pool creation)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | cognito-bootstrap-user |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cognito-idp:AdminAddUserToGroupcognito-idp:AdminCreateUser | ${userpoolcognitodeployerresource47EBE664.userPoolArn} | — |
cognito-idp-users-api
Section titled “cognito-idp-users-api”Provides an admin API for managing Cognito user pool users and groups. Called by the Admin API to provision users via external identity providers or programmatically.
Trigger: HTTP API Gateway (via the Admin API)
Environment variables (6)
| Variable | Value |
|---|---|
ADMIN_GROUPS | ["admin"] |
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
IDENTITY_PROVISIONER_FUNCTION_NAME | resolved at deploy time |
SERVICE_NAME | cognito-idp-users-api |
USER_GROUPS | ["user"] |
USER_POOL_ID | ${Select(1, Split("/", Select(5, Split(":", userpoolcognitodeployerresource47EBE664.userPoolArn))))} |
AWS resource access (3 statements)
| Actions | Resources | Conditions |
|---|---|---|
cognito-idp:AdminAddUserToGroupcognito-idp:AdminCreateUsercognito-idp:AdminDeleteUsercognito-idp:AdminDisableUsercognito-idp:AdminEnableUsercognito-idp:AdminGetUsercognito-idp:AdminSetUserPasswordcognito-idp:ListUsers | ${userpoolcognitodeployerresource47EBE664.userPoolArn} | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
lambda:InvokeFunction | ${mailboxauthidentityprovisionerD2F3DDF7.Arn}${mailboxauthidentityprovisionerD2F3DDF7.Arn}:* | — |
jmap-oauth-dcr
Section titled “jmap-oauth-dcr”Handles JMAP OAuth 2.0 Dynamic Client Registration (RFC 7591). Allows clients to register themselves as OAuth clients without pre-configuration, enabling third-party client applications to obtain credentials for accessing user mailboxes.
Trigger: HTTP API Gateway
Environment variables (3)
| Variable | Value |
|---|---|
IDENTITY_PROVISIONER_FUNCTION_NAME | resolved at deploy time |
SERVICE_NAME | jmap-oauth-dcr |
USER_POOL_ID | ${Select(1, Split("/", Select(5, Split(":", userpoolcognitodeployerresource47EBE664.userPoolArn))))} |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
lambda:InvokeFunction | ${mailboxauthidentityprovisionerD2F3DDF7.Arn}${mailboxauthidentityprovisionerD2F3DDF7.Arn}:* | — |
cognito-idp:CreateUserPoolClientcognito-idp:DeleteUserPoolClient | ${userpoolcognitodeployerresource47EBE664.userPoolArn} | — |
Administrative Addons
Section titled “Administrative Addons”These optional Lambdas provide vendor-facing operations. They are only deployed when explicitly enabled or when required addon providers are configured.
stack-update-api
Section titled “stack-update-api”Provides a vendor-facing API for initiating stack updates — moving the CloudFormation stack to a different release template. It drives the update through a Step Functions workflow rather than calling CloudFormation directly for the whole operation.
Trigger: HTTP API Gateway (Admin API integration)
Environment variables (8)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
POINTER_BUCKET | resolved at deploy time |
POINTER_KEY | serverlessinbox/templates/mail-server-standard/releases/stable.json |
ROOT_STACK_ARN | resolved at deploy time |
SERVICE_NAME | stack-update-api |
TEMPLATE_URL_TEMPLATE | resolved at deploy time |
TEMPLATE_VERSION_PARAM_NAME | resolved at deploy time |
AWS resource access (5 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:CreateChangeSetcloudformation:DeleteChangeSetcloudformation:DescribeChangeSetcloudformation:DescribeStackEventscloudformation:DescribeStackscloudformation:GetTemplatecloudformation:ListChangeSets | ${AWS::StackId} | — |
s3:GetObject | arn:aws:s3:::mailbox-artifacts-*/serverlessinbox/templates/*/releases/* | — |
dynamodb:BatchGetItemdynamodb:GetItemdynamodb:Query | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
ssm:DescribeParametersssm:GetParameterssm:GetParameterHistoryssm:GetParameters | arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${mailboxapisstackupdateaddontemplateversionC693154D} | — |
support-api
Section titled “support-api”Provides a vendor-facing API for support operations, so vendor engineers can work a support case against your deployment.
This function does not itself hold the diagnostic access a support engineer uses. That access
belongs to separate support roles, and is switched on and off by tagging them — which is why
this function’s IAM permissions are limited to tagging one specific role, with an
aws:TagKeys condition restricting which tags it may set. Read the access table below as the
boundary of what the support addon can reach on its own.
Trigger: HTTP API Gateway (Admin API integration)
Environment variables (9)
| Variable | Value |
|---|---|
AUDIT_EVENTS_QUEUE_URL | resolved at deploy time |
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
SERVICE_NAME | support-api |
STACK_ID | resolved at deploy time |
SUPPORT_CONFIG_READ_ROLE_ARN | resolved at deploy time |
SUPPORT_CONFIG_READ_TAG_KEY | serverless-inbox:support:config-read |
SUPPORT_DIAG_ROLE_ARN | resolved at deploy time |
SUPPORT_DIAG_TAG_KEY | serverless-inbox:support:diag |
SUPPORT_HOP_ROLE_ARN | resolved at deploy time |
AWS resource access (5 statements)
| Actions | Resources | Conditions |
|---|---|---|
iam:TagRoleiam:UntagRole | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/support-hop-9da399db-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | ForAllValues:StringEquals aws:TagKeys = serverless-inbox:support:diag, serverless-inbox:support:config-read |
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
sqs:SendMessage | ${mailboxdataauditwritingauditeventsqueue6FE4B54B.Arn} | — |
cloudtrail:LookupEvents | * | — |
execute-api:Invoke | arn:${AWS::Partition}:execute-api:*:791990038981:*/*/POST/support-case-sync | — |
support-role-assumption-collector
Section titled “support-role-assumption-collector”A scheduled Lambda that collects cross-account role assumption events for support role
tracking. Used alongside support-api to maintain an audit trail of vendor access.
Trigger: EventBridge scheduled rule
Environment variables (7)
| Variable | Value |
|---|---|
CONFIG_TABLE_NAME | ${Select(1, Split("/", Select(5, Split(":", mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn))))} |
SERVICE_NAME | support-role-assumption-collector |
SUPPORT_CONFIG_READ_ROLE_ARN | resolved at deploy time |
SUPPORT_CONFIG_READ_TAG_KEY | serverless-inbox:support:config-read |
SUPPORT_DIAG_ROLE_ARN | resolved at deploy time |
SUPPORT_DIAG_TAG_KEY | serverless-inbox:support:diag |
SUPPORT_HOP_ROLE_ARN | resolved at deploy time |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:BatchGetItemdynamodb:DeleteItemdynamodb:GetItemdynamodb:PutItemdynamodb:Querydynamodb:UpdateItem | ${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}${mailboxdatadatadeployeroverrideresolverresourceF9D9522A.configTableArn}/index/* | — |
cloudtrail:LookupEvents | * | — |
iam:TagRoleiam:UntagRole | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/support-hop-9da399db-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | ForAllValues:StringEquals aws:TagKeys = serverless-inbox:support:diag, serverless-inbox:support:config-read |
iam:ListRoleTags | arn:${AWS::Partition}:iam::${AWS::AccountId}:role/support-hop-9da399db-${Select(0, Split("-", Select(2, Split("/", AWS::StackId))))} | — |
Infrastructure & Custom Resources
Section titled “Infrastructure & Custom Resources”These TypeScript Lambdas are deployed as CloudFormation custom resource handlers and Step Functions workers. They are part of the deployment machinery rather than the mail path, and are invoked only during stack create/update/delete operations or on-demand by other infrastructure components.
artifact-updater
Section titled “artifact-updater”Handles self-update of Lambda code and UI bundles. Fetches updated artifacts from the artifact store and creates Lambda code updates, replicating changes to Lambda@Edge functions as needed. Its Lambda and CloudFront statements are narrowed by a condition on the root-stack tag, so they only reach resources belonging to its own deployment.
Trigger: CloudFormation custom resource, EventBridge scheduled rule, or HTTP API Gateway
Environment variables (7)
| Variable | Value |
|---|---|
ARTIFACT_BUCKET_BASE | mailbox-artifacts |
DIST_TAG | stable |
GRANULARITY | resolved at deploy time |
PROJECT | serverlessinbox |
ROOT_STACK_ID | ${Select(2, Split("/", AWS::StackId))} |
ROOT_STACK_TAG_VALUE | resolved at deploy time |
SERVICE_NAME | artifact-updater |
AWS resource access (21 statements)
| Actions | Resources | Conditions |
|---|---|---|
tag:GetResources | * | — |
lambda:GetFunctionlambda:GetFunctionConfigurationlambda:InvokeFunctionlambda:UpdateFunctionCode | arn:${AWS::Partition}:lambda:*:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
lambda:GetFunctionlambda:GetFunctionConfigurationlambda:InvokeFunctionlambda:UpdateFunctionCode | arn:${AWS::Partition}:lambda:*:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
lambda:TagResource | arn:${AWS::Partition}:lambda:*:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringEquals aws:TagKeys = serverless-inbox:artifact-version |
lambda:TagResource | arn:${AWS::Partition}:lambda:*:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = trueForAllValues:StringEquals aws:TagKeys = serverless-inbox:artifact-version |
lambda:GetFunctionConfigurationlambda:PublishVersion | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
lambda:GetFunctionConfigurationlambda:PublishVersion | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
cloudfront:CreateInvalidationcloudfront:GetDistributionConfigcloudfront:UpdateDistribution | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
cloudfront:CreateInvalidationcloudfront:GetDistributionConfigcloudfront:UpdateDistribution | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
cloudfront:TagResource | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringEquals aws:TagKeys = serverless-inbox:artifact-version |
cloudfront:TagResource | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = trueForAllValues:StringEquals aws:TagKeys = serverless-inbox:artifact-version |
s3:GetObject | arn:${AWS::Partition}:s3:::mailbox-artifacts-*/serverlessinbox/packages/*/releases/* | — |
cloudformation:DescribeStacks | ${AWS::StackId} | — |
s3:DeleteObjects3:PutObject | ${mailboxuiadminuiuiadminui2E4AC371.Arn}/content/* | — |
s3:DeleteObjects3:PutObject | ${mailboxuiadminuiuiadminui2E4AC371.Arn}/config/* | — |
s3:ListBucket | ${mailboxuiadminuiuiadminui2E4AC371.Arn} | StringLike s3:prefix = content/* |
s3:ListBucket | ${mailboxuiadminuiuiadminui2E4AC371.Arn} | StringLike s3:prefix = config/* |
s3:DeleteObjects3:PutObject | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn}/content/* | — |
s3:DeleteObjects3:PutObject | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn}/config/* | — |
s3:ListBucket | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn} | StringLike s3:prefix = content/* |
s3:ListBucket | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn} | StringLike s3:prefix = config/* |
data-override-resolver
Section titled “data-override-resolver”A CloudFormation custom resource that resolves data table names and other environment configuration at deploy time. Most Lambdas on this page take their table names from its outputs, which is why their environment values resolve through it.
Trigger: CloudFormation custom resource (on stack create/update)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | data-override-resolver |
AWS resource access (1 statements)
| Actions | Resources | Conditions |
|---|---|---|
dynamodb:DescribeTable | arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/* | — |
bucket-auto-empty
Section titled “bucket-auto-empty”A CloudFormation custom resource that empties S3 buckets on stack deletion. Needed because CloudFormation cannot delete a non-empty S3 bucket.
Trigger: CloudFormation custom resource (on stack delete)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | bucket-auto-empty |
AWS resource access (7 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
s3:ListBuckets3:ListBucketVersions | ${sharedpublicstaticassets97AAF7EA.Arn} | — |
s3:DeleteObjects3:DeleteObjectVersion | ${sharedpublicstaticassets97AAF7EA.Arn}/* | — |
s3:ListBuckets3:ListBucketVersions | ${mailboxuiadminuiuiadminui2E4AC371.Arn} | — |
s3:DeleteObjects3:DeleteObjectVersion | ${mailboxuiadminuiuiadminui2E4AC371.Arn}/* | — |
s3:ListBuckets3:ListBucketVersions | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn} | — |
s3:DeleteObjects3:DeleteObjectVersion | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn}/* | — |
content-deployer
Section titled “content-deployer”A CloudFormation custom resource that deploys UI bundle content (HTML, CSS, JavaScript and other assets) into the CloudFront-backed S3 buckets, and invalidates the distribution afterwards.
Trigger: CloudFormation custom resource (on stack create/update)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | content-deployer |
AWS resource access (13 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
s3:DeleteObjects3:PutObject | ${sharedpublicstaticassets97AAF7EA.Arn}/.well-known/openid-configuration | — |
s3:DeleteObjects3:PutObject | ${mailboxuiadminuiuiadminui2E4AC371.Arn}/content/* | — |
s3:ListBucket | ${mailboxuiadminuiuiadminui2E4AC371.Arn} | — |
s3:GetObjects3:GetObjectVersion | arn:${AWS::Partition}:s3:::mailbox-artifacts-${AWS::Region}/serverlessinbox/packages/mail-server-admin-ui/releases/v0.1.3/admin-ui.zip | — |
s3:DeleteObjects3:PutObject | ${mailboxuiadminuiuiadminui2E4AC371.Arn}/config/config.json | — |
cloudfront:CreateInvalidation | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/${mailboxuiadminuidistribution9EDF9DAA} | — |
s3:DeleteObjects3:PutObject | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn}/content/* | — |
s3:ListBucket | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn} | — |
s3:GetObjects3:GetObjectVersion | arn:${AWS::Partition}:s3:::mailbox-artifacts-${AWS::Region}/serverlessinbox/packages/mail-server-webmail-ui/releases/v0.0.39/webmail-ui.zip | — |
s3:DeleteObjects3:PutObject | ${mailboxuiwebmailuiuiwebmailuiCD23BF7D.Arn}/config/config.json | — |
cloudfront:CreateInvalidation | arn:${AWS::Partition}:cloudfront::${AWS::AccountId}:distribution/${mailboxuiwebmailuidistribution82B7033A} | — |
s3:DeleteObjects3:PutObject | ${sharedpublicstaticassets97AAF7EA.Arn}/.well-known/oauth-protected-resource | — |
stack-helpers
Section titled “stack-helpers”A CloudFormation custom resource that derives stack names, domain names, and other configuration values at deploy time from hosted zone and parameter data. Centralizes environment-specific resolution logic.
Trigger: CloudFormation custom resource (on stack create/update)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | stack-helpers |
AWS resource access (2 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
route53:GetHostedZone | arn:${AWS::Partition}:route53:::hostedzone/${hostedZoneId} | — |
stack-deployer-edge-starter
Section titled “stack-deployer-edge-starter”Starts the asynchronous deployment of the nested edge stack (the us-east-1 CloudFront and Lambda@Edge resources). Invoked as a custom resource, it starts the edge deployer state machine and polls it for completion; it holds no CloudFormation permissions of its own.
Trigger: CloudFormation custom resource (on stack create/update/delete)
Environment variables (2)
| Variable | Value |
|---|---|
MAILBOX_STACK_DEPLOYER_STATE_MACHINE_ARN | resolved at deploy time |
SERVICE_NAME | stack-deployer-edge-starter |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
states:StartExecution | ${mailboxedgestackdeployerinfraworkflow26959DC8} | — |
states:DescribeExecution | arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:${Select(6, Split(":", mailboxedgestackdeployerinfraworkflow26959DC8))}:* | — |
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:DescribeStacks | arn:${AWS::Partition}:cloudformation:us-east-1:${AWS::AccountId}:stack/${AWS::StackName}-edge-*/* | — |
stack-deployer-edge-worker
Section titled “stack-deployer-edge-worker”Performs the CloudFormation work for the nested edge stack — creating, updating, deleting, and polling it — and handles rollback. This is the half of the pair that carries the deployment permissions for the edge stack and the certificates, Lambda@Edge functions and roles it creates. Several of its statements are narrowed by a name prefix or a root-stack tag condition rather than by a fully specific ARN; the access table shows which.
Trigger: Step Functions state machine invocation (edge deployer workflow)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | stack-deployer-edge-worker |
AWS resource access (25 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:CreateStackcloudformation:DeleteStackcloudformation:DescribeStackEventscloudformation:DescribeStackscloudformation:GetStackPolicycloudformation:GetTemplateSummarycloudformation:SetStackPolicycloudformation:UpdateStack | arn:${AWS::Partition}:cloudformation:us-east-1:${AWS::AccountId}:stack/${AWS::StackName}-edge-*/* | — |
s3:GetObjects3:GetObjectVersion | arn:aws:s3:::mailbox-artifacts-us-east-1/serverlessinbox/packages/mail-server-cdk-edge/releases/v0.5.11/edge-stack-template.json | — |
s3:GetObjects3:GetObjectVersion | arn:aws:s3:::mailbox-artifacts-us-east-1/serverlessinbox/packages/mail-server-cdk-edge/releases/v0.5.11/lambdas/jmap-blob-download.zip | — |
tag:GetResources | * | — |
tag:TagResourcestag:UntagResources | * | ForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, serverless-inbox:edge, serverless-inbox:root-region, aws:cloudformation:* |
acm:RequestCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | — |
acm:DescribeCertificateacm:ListTagsForCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | — |
acm:AddTagsToCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:RequestTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
acm:AddTagsToCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:RequestTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:RequestTag/serverless-inbox:root-stack-id = true |
acm:AddTagsToCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
acm:RemoveTagsFromCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
acm:DeleteCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
acm:AddTagsToCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
acm:RemoveTagsFromCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
acm:DeleteCertificate | arn:${AWS::Partition}:acm:us-east-1:${AWS::AccountId}:certificate/* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
lambda:CreateFunctionlambda:DeleteFunctionlambda:GetFunctionlambda:ListVersionsByFunctionlambda:PublishVersionlambda:TagResourcelambda:UntagResourcelambda:UpdateFunctionCodelambda:UpdateFunctionConfiguration | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:${AWS::StackName}-edge-* | — |
lambda:CreateFunctionlambda:DeleteFunctionlambda:GetFunctionlambda:ListVersionsByFunctionlambda:PublishVersionlambda:TagResourcelambda:UntagResourcelambda:UpdateFunctionCodelambda:UpdateFunctionConfiguration | * | StringLike lambda:FunctionName = ${AWS::StackName}-edge-* |
lambda:DeleteFunctionlambda:GetFunctionlambda:ListVersionsByFunctionlambda:PublishVersionlambda:TagResourcelambda:UntagResourcelambda:UpdateFunctionCodelambda:UpdateFunctionConfiguration | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}StringEquals aws:ResourceTag/serverless-inbox:edge = true |
lambda:DeleteFunctionlambda:GetFunctionlambda:ListVersionsByFunctionlambda:PublishVersionlambda:TagResourcelambda:UntagResourcelambda:UpdateFunctionCodelambda:UpdateFunctionConfiguration | arn:${AWS::Partition}:lambda:us-east-1:${AWS::AccountId}:function:* | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}StringEquals aws:ResourceTag/serverless-inbox:edge = trueNull aws:ResourceTag/serverless-inbox:root-stack-id = true |
iam:PassRole | ${mailboxedgestackdeployerjmapblobdownloadrole20737A6F.Arn} | StringEquals iam:PassedToService = lambda.amazonaws.com, edgelambda.amazonaws.com |
resource-groups:CreateGroup | * | — |
resource-groups:DeleteGroupresource-groups:GetGroupresource-groups:GetGroupConfigurationresource-groups:GetGroupQueryresource-groups:GetTagsresource-groups:Tagresource-groups:Untagresource-groups:UpdateGroupresource-groups:UpdateGroupQuery | arn:${AWS::Partition}:resource-groups:us-east-1:${AWS::AccountId}:group/${AWS::StackName}-edge-*-serverless-inbox | — |
route53:ChangeResourceRecordSetsroute53:ListResourceRecordSets | arn:${AWS::Partition}:route53:::hostedzone/${hostedZoneId} | — |
route53:GetChange | arn:${AWS::Partition}:route53:::change/* | — |
stack-deployer-data-starter
Section titled “stack-deployer-data-starter”Starts the asynchronous deployment of the nested data stack, which owns the DynamoDB tables and the email blob store. Like the other starters it only starts the state machine and watches the execution.
Trigger: CloudFormation custom resource (on stack create/update/delete)
Environment variables (2)
| Variable | Value |
|---|---|
MAILBOX_STACK_DEPLOYER_STATE_MACHINE_ARN | resolved at deploy time |
SERVICE_NAME | stack-deployer-data-starter |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
states:StartExecution | ${mailboxdatadatadeployerinfraworkflow48B64ECE} | — |
states:DescribeExecution | arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:${Select(6, Split(":", mailboxdatadatadeployerinfraworkflow48B64ECE))}:* | — |
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:DescribeStacks | arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${AWS::StackName}-data/* | — |
stack-deployer-data-worker
Section titled “stack-deployer-data-worker”Performs the CloudFormation work for the nested data stack. Because the data stack creates the tables and the blob store, this worker holds the DynamoDB and S3 lifecycle permissions for them — scoped by name prefix to the data stack’s own resources. Deploying the data stack separately is what lets the tables and bucket survive a replacement of the main stack.
Trigger: Step Functions state machine invocation (data deployer workflow)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | stack-deployer-data-worker |
AWS resource access (9 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:CreateStackcloudformation:DeleteStackcloudformation:DescribeStackEventscloudformation:DescribeStackscloudformation:GetStackPolicycloudformation:GetTemplateSummarycloudformation:SetStackPolicycloudformation:UpdateStack | arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${AWS::StackName}-data/* | — |
cloudformation:ValidateTemplate | * | — |
s3:GetObjects3:GetObjectVersion | arn:aws:s3:::mailbox-artifacts-${AWS::Region}/serverlessinbox/packages/mail-server-cdk/releases/v0.5.11/data-stack-template.json | — |
tag:GetResources | * | — |
tag:TagResourcestag:UntagResources | * | ForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
dynamodb:CreateTabledynamodb:DeleteTabledynamodb:DescribeContinuousBackupsdynamodb:DescribeTabledynamodb:DescribeTableReplicaAutoScalingdynamodb:DescribeTimeToLivedynamodb:ListTagsOfResourcedynamodb:TagResourcedynamodb:UntagResourcedynamodb:UpdateContinuousBackupsdynamodb:UpdateTabledynamodb:UpdateTimeToLive | arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${AWS::AccountId}-${mailboxdatastackhelpers2FE97920.s3SafeDataStackName}-* | — |
s3:CreateBuckets3:DeleteBuckets3:DeleteBucketPolicys3:GetBucketLocations3:GetBucketOwnershipControlss3:GetBucketPolicys3:GetBucketPublicAccessBlocks3:GetBucketTaggings3:GetBucketVersionings3:GetEncryptionConfigurations3:GetLifecycleConfigurations3:PutBucketOwnershipControlss3:PutBucketPolicys3:PutBucketPublicAccessBlocks3:PutBucketTaggings3:PutBucketVersionings3:PutEncryptionConfigurations3:PutLifecycleConfiguration | arn:${AWS::Partition}:s3:::${AWS::AccountId}-${mailboxdatastackhelpers2FE97920.s3SafeDataStackName}-* | — |
kms:CreateGrantkms:DescribeKey | arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:alias/aws/dynamodbarn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:alias/aws/s3arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/* | Bool kms:GrantIsForAWSResource = true |
stack-deployer-cognito-starter
Section titled “stack-deployer-cognito-starter”Starts the asynchronous deployment of the nested Cognito stack, which owns the user pool when the built-in identity provider is used. It only starts the state machine and watches the execution.
Trigger: CloudFormation custom resource (on stack create/update/delete)
Environment variables (2)
| Variable | Value |
|---|---|
MAILBOX_STACK_DEPLOYER_STATE_MACHINE_ARN | resolved at deploy time |
SERVICE_NAME | stack-deployer-cognito-starter |
AWS resource access (4 statements)
| Actions | Resources | Conditions |
|---|---|---|
states:StartExecution | ${userpoolcognitodeployerinfraworkflow211968FD} | — |
states:DescribeExecution | arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:${Select(6, Split(":", userpoolcognitodeployerinfraworkflow211968FD))}:* | — |
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:DescribeStacks | arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${AWS::StackName}-cognito/* | — |
stack-deployer-cognito-worker
Section titled “stack-deployer-cognito-worker”Performs the CloudFormation work for the nested Cognito stack, and therefore holds the user pool lifecycle permissions. Keeping the user pool in its own nested stack is what lets it survive a replacement of the main stack, so that existing sign-ins are not invalidated by an update.
Trigger: Step Functions state machine invocation (Cognito deployer workflow)
Environment variables (1)
| Variable | Value |
|---|---|
SERVICE_NAME | stack-deployer-cognito-worker |
AWS resource access (21 statements)
| Actions | Resources | Conditions |
|---|---|---|
cloudformation:DescribeStacks | ${AWS::StackId} | — |
cloudformation:CreateStackcloudformation:DeleteStackcloudformation:DescribeStackEventscloudformation:DescribeStackscloudformation:GetStackPolicycloudformation:GetTemplateSummarycloudformation:SetStackPolicycloudformation:UpdateStack | arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${AWS::StackName}-cognito/* | — |
cloudformation:GetTemplate | arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${AWS::StackName}-cognito/* | — |
cloudformation:ValidateTemplate | * | — |
s3:GetObjects3:GetObjectVersion | arn:aws:s3:::mailbox-artifacts-${AWS::Region}/serverlessinbox/packages/mail-server-cognito/releases/v0.5.11/cognito-data-stack-template.json | — |
tag:GetResources | * | — |
tag:TagResourcestag:UntagResources | * | ForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
cognito-idp:CreateUserPool | * | — |
cognito-idp:DeleteUserPoolcognito-idp:DescribeUserPoolcognito-idp:GetUserPoolMfaConfigcognito-idp:ListTagsForResourcecognito-idp:SetUserPoolMfaConfigcognito-idp:UntagResourcecognito-idp:UpdateUserPool | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
cognito-idp:DeleteUserPoolcognito-idp:DescribeUserPoolcognito-idp:GetUserPoolMfaConfigcognito-idp:ListTagsForResourcecognito-idp:SetUserPoolMfaConfigcognito-idp:UntagResourcecognito-idp:UpdateUserPool | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
cognito-idp:TagResource | * | StringEquals aws:RequestTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
cognito-idp:TagResource | * | StringEquals aws:RequestTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:RequestTag/serverless-inbox:root-stack-id = trueForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
cognito-idp:TagResource | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))}ForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
cognito-idp:TagResource | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = trueForAllValues:StringLike aws:TagKeys = serverless-inbox:product, serverless-inbox:root-stack, serverless-inbox:root-stack-id, serverless-inbox:stack, serverless-inbox:component, serverless-inbox:deployer_type, Name, serverless-inbox:description, aws:cloudformation:* |
cognito-idp:CreateUserPoolDomaincognito-idp:DeleteUserPoolDomaincognito-idp:UpdateUserPoolDomain | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
cognito-idp:CreateUserPoolDomaincognito-idp:DeleteUserPoolDomaincognito-idp:UpdateUserPoolDomain | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
cognito-idp:DescribeUserPoolDomain | * | — |
cognito-idp:CreateResourceServercognito-idp:DeleteResourceServercognito-idp:DescribeResourceServercognito-idp:UpdateResourceServer | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
cognito-idp:CreateResourceServercognito-idp:DeleteResourceServercognito-idp:DescribeResourceServercognito-idp:UpdateResourceServer | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
cognito-idp:CreateGroupcognito-idp:DeleteGroupcognito-idp:GetGroupcognito-idp:UpdateGroup | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack-id = ${Select(2, Split("/", AWS::StackId))} |
cognito-idp:CreateGroupcognito-idp:DeleteGroupcognito-idp:GetGroupcognito-idp:UpdateGroup | * | StringEquals aws:ResourceTag/serverless-inbox:root-stack = ${AWS::StackName}Null aws:ResourceTag/serverless-inbox:root-stack-id = true |
Not deployed by the standard app
Section titled “Not deployed by the standard app”mcp-api
Section titled “mcp-api”Implements the Model Context Protocol (MCP), allowing AI agents and LLM applications to
interact with mailbox data and operations. It requires an Advanced license tier and is gated
behind the enableMcp property of the MailServer construct.
The standard app does not set that property, so mcp-api is not part of the template the
tables above are generated from and therefore has no entry on this page. A deployment that
enables it gets an additional function whose permissions are not documented here.
Logging configuration
Section titled “Logging configuration”All Go lambdas use a buffered logging strategy designed to keep CloudWatch Logs quiet during
normal operation while retaining full diagnostic context for failures. Behaviour is controlled
by a LOG_LEVEL environment variable. The standard template does not set LOG_LEVEL on any
function, which is why it does not appear in the environment tables above — the unset default
described below applies everywhere.
Default behaviour (no LOG_LEVEL set): the emit level defaults to error. Debug, info,
and warn messages are written into a 1000-entry in-memory ring buffer instead of CloudWatch.
Only error-level messages are emitted immediately. When an error occurs and the lambda calls
Flush(), the entire ring buffer is dumped retroactively — giving you the debug trail leading
up to the failure without paying the CloudWatch cost on every successful invocation. If the
buffer fills (more than 1000 entries), the oldest entries are silently dropped to make room.
LOG_LEVEL values:
| Value | Behaviour |
|---|---|
| (unset) | Equivalent to error — only errors emitted immediately; everything else buffered |
error | Same as above |
warn | Warn and error emitted immediately; debug and info buffered |
info | Info, warn, and error emitted immediately; debug buffered |
debug | All messages emitted immediately; buffering disabled |
Setting LOG_LEVEL=debug or LOG_LEVEL=info disables buffering for the corresponding levels,
which is useful during development or active incident investigation but increases CloudWatch
volume in production.