What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report

Agility CMS
AWS Amplify

AWS Amplify

Deploy an Agility-powered Next.js site to AWS Amplify, with server rendering, ISR and preview mode intact, inside the AWS account you already have.

  • Hosting

AWS Amplify

Integration Overview

AWS Amplify Hosting builds and serves your Next.js front end from your own AWS account. Connect the repository, add your Agility API keys as environment variables, and every push deploys. A webhook from Agility rebuilds the site when an editor publishes.

What is AWS Amplify?

Amplify is AWS's managed hosting service for web applications. Its managed Next.js hosting runs the parts that need a server, including server-side rendering, incremental static regeneration, React Server Components and API routes, behind a CloudFront CDN, with a preview deployment on every pull request.

The honest reason to pick it is that you're already in AWS. If your billing, your IAM and your security review all live there, hosting the front end somewhere else means another vendor to justify. If you aren't tied to AWS, Vercel and Netlify are more direct routes to the same result, and we integrate with both.

A note on images

Agility optimises images at its own CDN, so Amplify's image optimisation never needs to be in the path. Our starter uses AgilityPic rather than next/image for that reason, which also keeps a fully static export on the table if that's what you want.

Why use this integration?

  • Every Next.js feature, not a subset

    Managed hosting covers server-side rendering, incremental static regeneration, React Server Components and API routes. Preview mode works too, so editors can review draft content before it's published.

  • It rebuilds when someone publishes

    Point an Agility webhook at your Amplify build hook and publishing content triggers a deploy. Nobody has to remember to run anything.

  • A preview for every pull request

    Amplify builds a deployment per pull request, so a content model change and the front-end change that depends on it get reviewed together rather than one after the other.

  • Inside the account you already have

    Billing, IAM, your VPC and your security review all stay where they are. For a lot of teams that's the whole argument, and it's a good one.

Steps for Implementation

  1. 1

    Start from a Next.js project

    The Agility Next.js starter is already wired to the content APIs, so you're configuring credentials rather than building an integration from scratch.

  2. 2

    Connect your repository to Amplify

    In the AWS Amplify console, create a new app and point it at your GitHub, GitLab, Bitbucket or CodeCommit repository and the branch you want to deploy.

  3. 3

    Add your Agility credentials

    Set your instance GUID, fetch key, preview key and security key as environment variables. Build command is npm run build, and the output directory is .next for managed hosting or out for a static export.

  4. 4

    Wire up the publish webhook

    Create a build hook in Amplify and add it as a webhook in Agility, so publishing content kicks off a deploy.

Documentation

  • Deploying Next.js to AWS Amplify

    Our own step-by-step guide, including build settings and the static export caveats.

  • AWS Amplify Hosting documentation

    AWS's own reference for build settings, environment variables and custom domains.