Troubleshooting
Common issues and how to resolve them.
Emails not arriving
- Check DNS records: verify MX and TXT records are correctly set:
dig MX receive.yourdomain.com dig TXT _amazonses.receive.yourdomain.com - Check SES verification: confirm your domain shows as Verified in the SES Console.
- Check the region: SES inbound only works in
us-east-1,us-west-2, andeu-west-1. - Check the S3 bucket: look for
.emlfiles under theincoming/prefix in the AWS Console. - Check Ingest Lambda logs: CloudWatch logs will show parsing errors if the email couldn't be processed.
API returns empty results
- Check the inbox name: it's the local part of the email address (before
@), case-insensitive. If you sent toTest@receive.yourdomain.com, queryinbox=test. - Wait for processing: there's a small delay (typically under 2 seconds) between email arrival and API availability.
- Use long-polling: add
wait=trueto block until emails arrive:curl -H "Authorization: Bearer $TOKEN" \ "$API_URL/v1/emails?inbox=test&wait=true&timeout=15"
Deploy fails
- Wrong AWS region: must be
us-east-1,us-west-2, oreu-west-1. - Invalid credentials: ensure your
AWS_PROFILEhas permissions for Lambda, S3, DynamoDB, SES, and CloudFormation. - SES receipt rule conflict: only one active receipt rule set per region per account. Deactivate any existing rule set first.
reading ACM Certificates: empty result
The ACM certificate lookup failed. This happens when API_DOMAIN is set without HOSTED_ZONE_ID and no matching certificate exists.
Verify:
- The certificate domain matches
API_DOMAINexactly - The certificate is in the same region as
AWS_REGION - The certificate status is Issued (not Pending Validation)
aws acm list-certificates --region $AWS_REGION \
--query "CertificateSummaryList[?DomainName=='api.inbox.yourdomain.com']"Deploy hangs on deleting ApiRouterCdnSslCertificate
This can happen when switching from Route 53 to external DNS. CloudFront may hold onto the certificate SST is trying to delete.
If the delete hangs for more than 5 minutes, use --target to remove only the specific resource that's stuck instead of tearing down the entire stack:
bun x sst remove --stage dev --target ApiRouterThis removes the CloudFront distribution and its associated certificate without affecting your S3 bucket, DynamoDB tables, or SES configuration. Then redeploy to recreate it cleanly.
Authentication errors
- 401 UNAUTHORIZED: check that you're sending the token in the
Authorizationheader asBearer <token>. - Token not working: tokens are stored as SHA-256 hashes. If you lost the original token, revoke the key and create a new one:
bun run provision --list # find the keyId bun run provision --revoke <keyId> bun run provision --create --name new-key
FAQ
Can I use a root domain instead of a subdomain?
You can, but it's not recommended. Using receive.yourdomain.com avoids conflicts with existing MX records on your root domain.
How long are emails stored?
All data auto-expires. See Data Retention for the full breakdown and how to customize retention periods.
Is there a rate limit?
No application-level rate limits. AWS Lambda concurrency limits apply (default: 1000 concurrent executions per region).
Can multiple projects share the same deployment?
Yes, that's the intended setup. Deploy once, create separate API keys per project, and use unique inbox prefixes to isolate emails.