> ## Documentation Index
> Fetch the complete documentation index at: https://ravion-b90c0359-mintlify-710044b6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to deploy Vike to AWS

> Deploy a Vike static site to your AWS account with S3 and CloudFront using Ravion, including build pipelines, custom domains, HTTPS, and CDN caching.

Deploy a Vike-generated static site to S3 and CloudFront.

## Prerequisites

* A Git repository containing your application and its production build command.
* A Ravion account with your AWS account connected. Start free at [Ravion signup](https://app.ravion.com/signup).
* The Ravion CLI installed and authenticated. See [CLI installation](/cli/installation).

The examples use `my-org/my-app` as a placeholder. Replace it with your repository before applying the config.

<Prompt description="Set up this Vike app for Ravion static hosting." icon="sparkles" actions={["copy", "cursor"]}>
  1. Before any other action, read and follow [https://www.ravion.com/docs/start-here#agent-workflow](https://www.ravion.com/docs/start-here#agent-workflow) as the mandatory agent workflow.
  2. Use [https://www.ravion.com/docs/deploy/aws/vike](https://www.ravion.com/docs/deploy/aws/vike) as the framework-specific source of truth.
  3. Confirm this repository contains Vike and locate its app root in a monorepo.
  4. Inspect `package.json`, Vike config, and adapter settings to determine the actual build command, generated output directory, and whether client-side routing needs SPA handling.
  5. Generate `ravion.yaml` with `rvn-aws-static` and the repository's real AWS account, region, branch, slug, and output values.
  6. Ask the user for missing AWS account IDs, repository slugs, project IDs, or adapter output before proceeding; do not guess.
</Prompt>

## Configure the deployment

Ravion creates and manages the AWS resources in your account.

This example uses [Railpack](https://railpack.com) for the build. Use `build_source: dockerfile` instead when you need a custom Dockerfile.

Configure your Vike project for a static build, then use its generated output directory in `ravion.yaml`.

```yaml ravion.yaml theme={null}
project:
  givenId: vike-site
  name: Vike site
environments:
  - givenId: production
    name: Production
    moduleInstances:
      - givenId: static-site
        name: Vike site
        type: rvn-aws-static
        version: 1.0.0
        input:
          aws_account_id: ravion-prod
          aws_region: us-east-1
          name: vike-site-production
          routing: filesystem
          build_source: railpack
          source_repo: my-org/my-vike-site
          railpack_build_cmd: npm run build
```

The Vike build command and output directory depend on the adapter and project configuration. Verify the generated directory is `dist` before applying. If your app uses a server adapter, use the ECS pattern instead of this static page.

## Apply and connect your domain

```bash theme={null}
ravion project create --given-id vike-site --name "Vike site"
ravion project config apply vike-site --file ravion.yaml --dry-run
ravion project config apply vike-site --file ravion.yaml
```

Use [custom domains](/guides/custom-domains) to configure the CloudFront alias.

## Next steps

<CardGroup cols={2}>
  <Card title="Custom domains" icon="globe" href="/guides/custom-domains">
    Point a domain at your deployed service and manage its certificate.
  </Card>

  <Card title="Project config" icon="file-code" href="/config-as-code/project-config-file">
    Preview and apply Ravion configuration from source control.
  </Card>

  <Card title="Pipelines" icon="arrow-progress" href="/config-as-code/pipeline-config-file">
    Add approvals, migrations, and deployment automation.
  </Card>

  <Card title="Logs and metrics" icon="chart-line" href="/modules/logs">
    Inspect deploy output and production health in Ravion.
  </Card>
</CardGroup>
