Rate Limits & Data Retention

Throughput limits and automatic data expiration policies.

Rate limits

mail-catcher does not impose application-level rate limits. Throughput is governed by AWS service limits:

ResourceDefault LimitNotes
Lambda concurrent executions1,000 per regionShared across all Lambda functions in the account
DynamoDB read capacityOn-demand (auto-scaling)No pre-provisioned capacity to manage
S3 request rate5,500 GET/s per prefixMore than sufficient for typical usage

For most E2E testing and email ingestion use cases, these defaults are well above what you'll need.

Data retention

mail-catcher is designed as an ephemeral testing tool. All data auto-expires:

DataRetentionMechanismLocation
Email metadata7 daysDynamoDB TTLEmailsTable
Raw .eml files8 daysS3 lifecycle ruleEmailBucket/incoming/
Parsed attachments8 daysS3 lifecycle ruleEmailBucket/attachments/
API keysPermanentManual revocation onlyApiKeysTable

The 1-day buffer between DynamoDB (7 days) and S3 (8 days) ensures raw files remain accessible until after their index entries expire.

Customizing retention

You can adjust retention periods by modifying the infrastructure code in packages/infra/src/index.ts:

  • DynamoDB TTL: change the ttl calculation in the ingest handler
  • S3 lifecycle: change the expiration setting on the bucket lifecycle rule

After changing, redeploy:

bun run deploy:dev

Existing records keep their original expiration. New records use the updated values.

Search Documentation

Search through the docs