# AWS

> The AWS template: SES, SNS and SQS, Lambda and RDS or your Postgres, in your account.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://mail.docs.sypnia.com/self-hosting/aws/

For agents: Mail self-host on AWS: npx @sypnia/mail self-host aws --region --domain creates SES configuration set + event destination, SNS + SQS, Lambdas, optional receipt rules, S3, your Postgres or RDS; prints DNS records; SES sandbox → request production access; --smtp adds Fargate + NLB relay.

```bash
npx @sypnia/mail self-host aws --region us-east-1 --domain mail.example.com
```

It creates the SES configuration set and event destination, the SNS topic and SQS queues, the Lambda functions, the receipt rule set for inbound if you ask for it, an S3 bucket, and uses your Postgres or creates an RDS instance. It prints the DNS records for your sending domain.

Your SES account starts in the sandbox; request production access in the SES console before sending to real people. The SMTP relay is optional on AWS (`--smtp` adds the Fargate service and load balancer).
