# Amazon Web Services hosting

Since 30 October 2026 production has run on Amazon Web Services in the Mumbai region (`ap-south-1`). One EC2 server runs Ubuntu 24.04 with the application, the voice worker, PostgreSQL 16, Caddy and the mail server. A private, encrypted S3 bucket holds release archives and backups. Administration goes through AWS Systems Manager, with no inbound management port open.

- **Status:** Reference
- **Audience:** both, developer
- **Last verified:** 2026-11-02
- **Canonical:** https://connectbyjbrh.com/docs/technology/aws-hosting/

## What it is

Amazon Web Services is Amazon's cloud platform. Connect uses a small, deliberate part of it: EC2 for the virtual server, EBS for its encrypted disk, an Elastic IP for a stable address, S3 for files, Systems Manager (SSM) Run Command for administration, and AWS Budgets for spending alerts. The mail server on the same host relays outbound mail through SMTP2GO; Amazon SES is supported for identities configured to use it and has [its own page](/docs/technology/amazon-ses/).

Before the move, the same host layout ran on Google Cloud, and releases went through a Cloud Build trigger. The AWS host uses the same directory layout and release scripts.

**Category** — Cloud infrastructure
**Region** — `ap-south-1` (Mumbai)
**Server** — EC2 `t3.xlarge` (4 vCPU, 16 GB), 40 GB encrypted gp3, IMDSv2 only, termination protection
**Official site** — [aws.amazon.com](https://aws.amazon.com/)

## Where Connect uses it

| Place in Connect | What it does there |
|---|---|
| EC2 and EBS | The one production server and its encrypted disk |
| S3 | `releases/<sha>.tgz` archives, operations files and backups (private, encrypted) |
| SSM Run Command | Every release and administrative action, through an instance role with no access keys |
| `ops/aws/release.sh` | Backup, atomic swap, probes and bounded rollback under a host lock |
| AWS Budgets | Alerts on spend to the owner's email |

## How it connects

1. A `production-core` commit is archived and uploaded to S3
2. SSM runs `release.sh` on the host
3. A verified `pg_dump` is taken (`BACKUP-OK`)
4. The new app directory is swapped in and the services restart
5. Probes pass (`DEPLOY-OK`), or the previous directory is restored

## Benefits and limits

What it gives Connect:

- No inbound management port: the attack surface is the website and the mail ports only.
- Data in India, close to the businesses and callers Connect serves.
- A recorded, scripted release with a backup before every change and a kept rollback directory.

Where it stops, and what Connect does about it:

- One server is a single point of failure. A host outage stops the service until it is restored.
- Budgets alert. They do not stop spending.
- A merge does not release by itself on AWS yet: someone runs the release script through SSM.

## Security and privacy

- IMDSv2 only, an encrypted disk and bucket, and an instance role scoped to its own bucket and SSM.
- No access keys on the host; credentials come from the instance role.
- This page names no account, address or instance identifier. Those live in the private infrastructure record.

## Licence, cost and versions

| Question | Answer |
|---|---|
| Licence | Commercial cloud service (pay as you go) |
| Cost, as recorded | About $139 a month on demand for the server, disk, address and snapshots (AWS Pricing API, Mumbai, recorded 30 October 2026). Outbound mail relaying (SMTP2GO) is a separate service, not part of this figure |
| Versions | Ubuntu 24.04, PostgreSQL 16, Python 3.12 (host packages) |
| Compatibility | The same layout as the previous Google Cloud host, so the scripts are shared |

## Troubleshooting

**A release reports no `DEPLOY-OK`** — The probes failed and the script restored the previous directory. Read the release log before retrying.
**The site is unreachable but the instance is running** — Check that the Elastic IP is still attached and that DNS names it.
**SSM commands time out** — The SSM agent or the instance role is unhealthy. There is deliberately no SSH fallback port.

## Official references

- [Amazon EC2 documentation](https://docs.aws.amazon.com/ec2/)
- [AWS Systems Manager Run Command](https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html)
- [Amazon S3 documentation](https://docs.aws.amazon.com/s3/)
- [EC2 on-demand pricing](https://aws.amazon.com/ec2/pricing/on-demand/)

## Questions

### Where is my data stored?

On the production server's encrypted disk in the AWS Mumbai region, with backups in an encrypted bucket in the same region. See [data residency](/docs/technology/data-residency/) for what that does and does not mean.

### Is Connect still on Google Cloud?

No. The services there are stopped and held off since the cutover. The release scripts are shared, which is why some history mentions Cloud Build.

## Related

- [Amazon SES](https://connectbyjbrh.com/docs/technology/amazon-ses/)
- [Backups and restore](https://connectbyjbrh.com/docs/technology/backup-restore/)
- [Data residency](https://connectbyjbrh.com/docs/technology/data-residency/)
- [systemd services](https://connectbyjbrh.com/docs/technology/systemd/)

## What this page is based on

- `docs/infrastructure/AWS-HOST.md`
- `ops/aws/release.sh`
- `ops/aws/bootstrap-host.sh`
- AGENTS.md §6
