> ## Documentation Index
> Fetch the complete documentation index at: https://docs.springwinter.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a full-stack SaaS application on AWS

> Map a SaaS frontend, API, database, background jobs and object storage to supported AWS resources, with explicit security, recovery and verification steps.

A full-stack SaaS application can use a static frontend or server-rendered web server, a private SQL database and separate workers on SpringWinter. Choose resources from the processes your application actually runs. Authentication, tenant isolation, payment handling and recovery remain application responsibilities.

## Suitability and prerequisites

Use this architecture when your app fits [supported resources](https://docs.springwinter.dev/reference/compatibility.md) and you want customer-owned AWS. Do not split a small application into services only to match a diagram. A single server-rendered web process plus PostgreSQL is often easier to operate than separate frontend and API processes.

You need a SpringWinter account, a verified AWS connection, an approved Region, GitHub access for builds and a reproducible application. Check runtime versions and lockfiles. Use the [Next.js/PostgreSQL template](https://github.com/SpringWinter-Research/templates/tree/v0.1.0/nextjs-postgres) or [React/FastAPI template](https://github.com/SpringWinter-Research/templates/tree/v0.1.0/react-fastapi) as small starting points, not complete SaaS products.

## Resource map

```mermaid theme={null}
flowchart LR
    Operator[Developer or agent] --> Control[SpringWinter control plane]
    Control -->|Approved resource workflows| AWS
    Browser[Browser] --> Frontend
    Browser --> Web
    subgraph AWS[Customer-owned AWS account]
        Frontend[Optional static frontend: CloudFront and S3]
        Web[Public web server: load balancer and Fargate]
        SQL[Private PostgreSQL or MySQL]
        Cache[Private Valkey]
        Jobs[Background workers]
        Storage[Private object storage]
        Web --> SQL
        Web --> Cache
        Jobs --> Cache
        Jobs --> SQL
        Web --> Storage
    end
    Web --> Providers[Payment, email, auth or model provider]
```

A public browser cannot reach a private SQL database. A split frontend calls the backend over public HTTPS. Configure CORS for the exact frontend origin and enforce authentication at the API. Object storage is private; the application must implement its supported access pattern rather than assuming a bucket becomes a public file server.

## Prepare reproducible components

| Component | Configuration to record |
| - | - |
| Frontend | Build command, output directory, public API origin and nested-route behavior. |
| Web process | Dockerfile, context, listen address, port and unauthenticated HTTP 200 health path. |
| Database | Engine/version requirements, TLS, connection pool, migrations, backups and restore objective. |
| Jobs | Command, queue protocol, retry/idempotency rules and shutdown behavior. |
| Uploads | Application S3 adapter, access policy and retention. |
| External services | Callback URLs, test mode, credentials and separate provider charges. |

The sample templates include no authentication, billing, tenant model or migration framework. Add those deliberately. Never put server credentials in public frontend environment variables. A container filesystem is temporary and is unsuitable as the only copy of uploaded files or SQLite business data.

## Deployment methods

In the dashboard, create or intentionally reuse data resources, then deploy the web process and workers. Deploy a split static frontend after the API URL is known. Configure runtime database/model credentials through secure environment settings; configure public frontend URLs at build time.

For Codex, Claude Code or Cursor, use [coding-agent installation and approval](https://docs.springwinter.dev/guides/coding-agents.md). Ask for one plan covering every component and dependency before the first mutation. The REST API exposes resources separately; use the [API reference](https://docs.springwinter.dev/api-reference/overview.md) and returned IDs. There is no generic Compose-stack import or invented SaaS deployment endpoint.

Keep schema changes separate from starting arbitrary numbers of web replicas. Review a migration runner, failure recovery and backup strategy before adding migrations. Do not assume the platform supplies an automatic release-command phase.

## Verify a real user journey

Observe every resource workflow, not just the frontend. Then test a synthetic account: sign up, sign in, access only its authorized records, write/read a disposable record, run a harmless background job and upload/download a sample object. Test two distinct tenants if the app is multi-tenant. Use a payment provider's sandbox and avoid external emails unless approved.

Test database TLS, private connectivity from compute and bounded pool behavior. Confirm new tasks are serving before checking data after an approved replacement. A health response or preview screenshot does not prove those checks.

## Costs, operations and cleanup

Estimate the application as a whole using [cost estimation](https://docs.springwinter.dev/guides/cost-estimation.md). Multiple web services may share project load balancing, but each process still consumes compute and can create logs, transfer and database load. A replica limit is not automatic scaling or a spend cap. Verify capacity with representative load before making throughput promises.

Use [deployment troubleshooting](https://docs.springwinter.dev/troubleshooting/deployments.md) for failed builds, health checks, CORS and database access. Watch queue depth and failed-job behavior separately from web health.

For cleanup, remove previews first, then dependent compute, then data resources only after an explicit retention decision. Decide which backups, objects and provider accounts to keep. Verify remaining AWS charges afterward.

## Questions

**Can I deploy frontend and backend in one resource?** A combined web process is possible when the application serves both. Do not force independent processes into one container without a supervision and shutdown plan.

**Does a private database secure every tenant?** No. Application authorization and tenant scoping still determine data access.

**Does SpringWinter supply SaaS authentication or payment logic?** The deployment resources do not implement your product's business rules. Keep and verify the chosen provider integrations.

Related: [React and FastAPI](https://docs.springwinter.dev/deploy/frameworks/react-fastapi.md), [Next.js](https://docs.springwinter.dev/deploy/nextjs.md), [workers and AI backends](https://docs.springwinter.dev/guides/ai-backends-workers.md), [architecture](https://docs.springwinter.dev/concepts/architecture.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.