From e081188c74beec5f530d10adad7370db1ec5e5fd Mon Sep 17 00:00:00 2001 From: osama-rizk Date: Tue, 29 Sep 2026 11:36:49 +0200 Subject: [PATCH 1/3] docs(self-hosting): restore preview banner Put back the preview callout and the '(Preview)' section title that were removed during review of #8605. ampx deploy still ships as a preview release, so the docs should say so. Also adds the banner to the secrets and environment variables page, which was added after the banner was removed. --- .../self-hosting/define-hosting/index.mdx | 8 ++++++++ .../self-hosting/define-pipeline/index.mdx | 8 ++++++++ .../self-hosting/external-pipelines/index.mdx | 8 ++++++++ .../deploy-and-host/self-hosting/frameworks/index.mdx | 8 ++++++++ .../self-hosting/getting-started/index.mdx | 8 ++++++++ .../[platform]/deploy-and-host/self-hosting/index.mdx | 10 +++++++++- .../secrets-and-environment-variables/index.mdx | 8 ++++++++ 7 files changed, 57 insertions(+), 1 deletion(-) diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx index b6767aa5b49..546f9cc8a01 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to customize your self-hosted infrastructure with custom domains, WAF rules, compute and CDN configuration, custom adapters, and CDK escape hatches. ## Framework detection diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx index 2689d09834b..36d7d5e9323 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to define a CI/CD pipeline that automatically deploys your application on every push, with support for multi-stage deployments, approval gates, and bake times. ## Defining a basic pipeline diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx index 589b7e90991..574858774e2 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to deploy your self-hosted application using GitHub Actions, GitLab CI, or any CI runner that can execute shell commands with AWS credentials. ## Understanding deployment flags diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx index fbeff7da851..a5af40b1e7e 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + When you call `defineHosting()`, the construct auto-detects your framework by inspecting `package.json` dependencies. Each framework maps to a specific build adapter that determines which hosting features are available. ## Detected frameworks diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx index 6e9e10592c3..f427ea2719a 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to install the hosting package, configure your first `defineHosting()` definition, and deploy your frontend to your own AWS account. ## Prerequisites diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx index 4f997f38a0a..cb42634ffa4 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx @@ -2,7 +2,7 @@ import { getChildPageNodes } from '@/utils/getChildPageNodes'; import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; export const meta = { - title: 'Self-managed hosting', + title: 'Self-managed hosting (Preview)', description: 'Deploy your frontend to your own AWS account with full AWS CDK control.', route: '/[platform]/deploy-and-host/self-hosting', platforms: [ @@ -32,6 +32,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + Self-managed hosting gives you full ownership of your frontend infrastructure. You deploy to your own AWS account using AWS CDK constructs, giving you complete control over Amazon S3 buckets, Amazon CloudFront distributions, Lambda@Edge functions, and every other resource in your stack. ## How it works diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx index 05c7b49e376..fae8fc4ec49 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx @@ -28,6 +28,14 @@ export function getStaticProps(context) { }; } +{/* PREVIEW-BANNER-START */} + + +**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. + + +{/* PREVIEW-BANNER-END */} + Self-managed hosting distinguishes between three kinds of values you can make available to your server-side compute: - **Plain environment variables** — non-sensitive literals baked into the CloudFormation template. From f56da94f868ad244896368bb78d12348242e3a67 Mon Sep 17 00:00:00 2001 From: osama-rizk Date: Tue, 29 Sep 2026 11:40:00 +0200 Subject: [PATCH 2/3] docs(self-hosting): point preview banner at GitHub issues instead of the closed RFC --- .../deploy-and-host/self-hosting/define-hosting/index.mdx | 2 +- .../deploy-and-host/self-hosting/define-pipeline/index.mdx | 2 +- .../deploy-and-host/self-hosting/external-pipelines/index.mdx | 2 +- .../deploy-and-host/self-hosting/frameworks/index.mdx | 2 +- .../deploy-and-host/self-hosting/getting-started/index.mdx | 2 +- src/pages/[platform]/deploy-and-host/self-hosting/index.mdx | 2 +- .../self-hosting/secrets-and-environment-variables/index.mdx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx index 546f9cc8a01..26063ee465c 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx index 36d7d5e9323..b13b4738956 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx index 574858774e2..e416d3669ba 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx index a5af40b1e7e..1c12ab6cb94 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx index f427ea2719a..25c84ee9231 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx index cb42634ffa4..9f980e09333 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx @@ -35,7 +35,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx index fae8fc4ec49..c2301007b38 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx @@ -31,7 +31,7 @@ export function getStaticProps(context) { {/* PREVIEW-BANNER-START */} -**This feature is in preview** and part of our [RFC](https://github.com/aws-amplify/amplify-backend/issues/3211). It is not recommended for production workloads yet, and APIs may change before general availability. See the RFC for instructions on installing the preview release. +**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). {/* PREVIEW-BANNER-END */} From d7c493c69ee0e12fc544dbaff03f2f45d2fc9abb Mon Sep 17 00:00:00 2001 From: osama-rizk Date: Tue, 29 Sep 2026 14:49:00 +0200 Subject: [PATCH 3/3] =?UTF-8?q?docs(self-hosting):=20address=20review=20?= =?UTF-8?q?=E2=80=94=20shared=20PreviewBanner,=20info=20style,=20reconcile?= =?UTF-8?q?=20--yes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace the seven inline banner copies with a shared component registered in mdx-components (like Callout), so it can't drift and removal at GA is a single change. Drops the unused PREVIEW-BANNER marker comments. - Use an info callout (matching the AWS Blocks preview notice) so warning styling stays reserved for actionable notes like the CDK bootstrap prerequisite. - Drop '(Preview)' from the section title; the banner carries the status. - External pipelines: describe what the ampx deploy prompt actually says, note that --yes accepts it without changing preview status, and rename example identifiers from 'production' to 'my-app' (also in getting started). --- mdx-components.tsx | 2 ++ .../PreviewBanner/PreviewBanner.tsx | 26 +++++++++++++++ .../__tests__/PreviewBanner.test.tsx | 21 ++++++++++++ src/components/PreviewBanner/index.ts | 1 + .../self-hosting/define-hosting/index.mdx | 8 +---- .../self-hosting/define-pipeline/index.mdx | 8 +---- .../self-hosting/external-pipelines/index.mdx | 32 ++++++++----------- .../self-hosting/frameworks/index.mdx | 8 +---- .../self-hosting/getting-started/index.mdx | 12 ++----- .../deploy-and-host/self-hosting/index.mdx | 10 ++---- .../index.mdx | 8 +---- 11 files changed, 73 insertions(+), 63 deletions(-) create mode 100644 src/components/PreviewBanner/PreviewBanner.tsx create mode 100644 src/components/PreviewBanner/__tests__/PreviewBanner.test.tsx create mode 100644 src/components/PreviewBanner/index.ts diff --git a/mdx-components.tsx b/mdx-components.tsx index 485df6b47f7..850d1976829 100644 --- a/mdx-components.tsx +++ b/mdx-components.tsx @@ -15,6 +15,7 @@ import { MDXTable } from './src/components/MDXComponents'; import { MigrationAlert } from './src/components/MigrationAlert'; +import { PreviewBanner } from './src/components/PreviewBanner'; import preToCodeBlock from './src/utils/pre-to-code-block'; import { Overview } from './src/components/Overview'; import ExternalLink from './src/components/ExternalLink'; @@ -65,6 +66,7 @@ export function useMDXComponents(components: MDXComponents): MDXComponents { Fragments, InlineFilter, MigrationAlert, + PreviewBanner, YoutubeEmbed, AIBanner, Overview, diff --git a/src/components/PreviewBanner/PreviewBanner.tsx b/src/components/PreviewBanner/PreviewBanner.tsx new file mode 100644 index 00000000000..bb72c2b1b8b --- /dev/null +++ b/src/components/PreviewBanner/PreviewBanner.tsx @@ -0,0 +1,26 @@ +import { Callout } from '@/components/Callout'; +import Link from 'next/link'; +import classNames from 'classnames'; + +/** + * Shared preview notice for features that have not reached general + * availability. Rendered from one place so a feature's pages stay in sync and + * the notice can be removed in one change at GA. + */ +export const PreviewBanner = () => { + return ( + + This feature is in preview. It is not recommended for + production workloads yet, and APIs may change before general availability. + Share feedback or report issues on{' '} + + GitHub + + . + + ); +}; diff --git a/src/components/PreviewBanner/__tests__/PreviewBanner.test.tsx b/src/components/PreviewBanner/__tests__/PreviewBanner.test.tsx new file mode 100644 index 00000000000..13fca72c569 --- /dev/null +++ b/src/components/PreviewBanner/__tests__/PreviewBanner.test.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { render, screen } from '@testing-library/react'; +import { PreviewBanner } from '../index'; + +describe('PreviewBanner', () => { + it('should render the preview notice', async () => { + render(); + expect( + await screen.findByText('This feature is in preview.') + ).toBeInTheDocument(); + }); + + it('should link to GitHub issues for feedback', async () => { + render(); + const link = await screen.findByRole('link', { name: 'GitHub' }); + expect(link).toHaveAttribute( + 'href', + 'https://github.com/aws-amplify/amplify-backend/issues' + ); + }); +}); diff --git a/src/components/PreviewBanner/index.ts b/src/components/PreviewBanner/index.ts new file mode 100644 index 00000000000..816e213d321 --- /dev/null +++ b/src/components/PreviewBanner/index.ts @@ -0,0 +1 @@ +export { PreviewBanner } from './PreviewBanner'; diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx index 26063ee465c..ec2e5377807 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-hosting/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to customize your self-hosted infrastructure with custom domains, WAF rules, compute and CDN configuration, custom adapters, and CDK escape hatches. diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx index b13b4738956..0ac38db1201 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/define-pipeline/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to define a CI/CD pipeline that automatically deploys your application on every push, with support for multi-stage deployments, approval gates, and bake times. diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx index e416d3669ba..03e82c339eb 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/external-pipelines/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to deploy your self-hosted application using GitHub Actions, GitLab CI, or any CI runner that can execute shell commands with AWS credentials. @@ -47,10 +41,12 @@ The `ampx deploy` command accepts flags that control which stacks are deployed: | `--backend` | Deploy only the backend stack (auth, data, functions) | | `--frontend` | Deploy only the frontend hosting stack | | `--pipeline` | Deploy only the pipeline stack | -| `--yes` (`-y`) | Skip the confirmation prompt — required in non-interactive CI | +| `--yes` (`-y`) | Accept the preview confirmation prompt — required in non-interactive CI | | (no flag) | Deploy all stacks | -Pass `--yes` in every CI job: `ampx deploy` prompts for confirmation before running, and without it the command blocks waiting for input. `--backend` and `--frontend` are mutually exclusive — deploy the backend first, then the frontend, in separate steps. This ordering ensures `amplify_outputs.json` is generated before the frontend build bundles it. +`ampx deploy` is a preview release, so it asks you to confirm before running: *ampx deploy is a PREVIEW release — not intended for production use. Do you want to continue?* In CI there is no one to answer, so pass `--yes` to accept the prompt; without it the command waits for input. Passing `--yes` does not change the preview status — keep deployments to non-production environments until general availability. + +`--backend` and `--frontend` are mutually exclusive — deploy the backend first, then the frontend, in separate steps. This ordering ensures `amplify_outputs.json` is generated before the frontend build bundles it. ## Deploying with GitHub Actions @@ -86,10 +82,10 @@ jobs: aws-region: us-east-1 - name: Deploy backend - run: npx ampx deploy --identifier production --backend --yes + run: npx ampx deploy --identifier my-app --backend --yes - name: Deploy frontend - run: npx ampx deploy --identifier production --frontend --yes + run: npx ampx deploy --identifier my-app --frontend --yes ``` @@ -114,8 +110,8 @@ deploy: before_script: - npm ci script: - - npx ampx deploy --identifier production --backend --yes - - npx ampx deploy --identifier production --frontend --yes + - npx ampx deploy --identifier my-app --backend --yes + - npx ampx deploy --identifier my-app --frontend --yes variables: AWS_REGION: us-east-1 ``` @@ -130,8 +126,8 @@ The `ampx deploy` command works in any environment with Node.js and valid AWS cr ```bash title="Generic CI script" npm ci -npx ampx deploy --identifier production --backend --yes -npx ampx deploy --identifier production --frontend --yes +npx ampx deploy --identifier my-app --backend --yes +npx ampx deploy --identifier my-app --frontend --yes ``` ## Splitting backend and frontend across jobs @@ -163,7 +159,7 @@ jobs: with: role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsDeployRole aws-region: us-east-1 - - run: npx ampx deploy --identifier production --backend --yes + - run: npx ampx deploy --identifier my-app --backend --yes deploy-frontend: runs-on: ubuntu-latest @@ -179,7 +175,7 @@ jobs: with: role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsDeployRole aws-region: us-east-1 - - run: npx ampx deploy --identifier production --frontend --yes + - run: npx ampx deploy --identifier my-app --frontend --yes ``` ## Environment-specific deployments @@ -188,7 +184,7 @@ Use branch names or environment variables to deploy to different environments: ```yaml title=".github/workflows/deploy.yml" - name: Deploy - run: npx ampx deploy --identifier ${{ github.ref_name == 'main' && 'production' || 'staging' }} --yes + run: npx ampx deploy --identifier ${{ github.ref_name == 'main' && 'my-app' || 'my-app-staging' }} --yes ``` ## Next steps diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx index 1c12ab6cb94..68e08012102 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/frameworks/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + When you call `defineHosting()`, the construct auto-detects your framework by inspecting `package.json` dependencies. Each framework maps to a specific build adapter that determines which hosting features are available. diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx index 25c84ee9231..f45e8a3477b 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/getting-started/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + In this guide, you will learn how to install the hosting package, configure your first `defineHosting()` definition, and deploy your frontend to your own AWS account. @@ -73,7 +67,7 @@ The framework is auto-detected from your `package.json`, so no framework configu Run `ampx deploy` to synthesize and deploy both your backend and hosting stacks: ```bash title="Terminal" -npx ampx deploy --identifier production +npx ampx deploy --identifier my-app ``` The `--identifier` flag names your deployment environment. This command deploys everything: backend resources, the frontend build, and the hosting infrastructure (S3 bucket, CloudFront distribution, and compute layer). @@ -85,7 +79,7 @@ Once complete, the CLI prints your CloudFront distribution URL where your applic If your backend is already deployed and you only need to update the frontend: ```bash title="Terminal" -npx ampx deploy --identifier production --frontend +npx ampx deploy --identifier my-app --frontend ``` This skips the backend stack and only rebuilds and deploys your frontend assets. diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx index 9f980e09333..d3c3172b8f6 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/index.mdx @@ -2,7 +2,7 @@ import { getChildPageNodes } from '@/utils/getChildPageNodes'; import { getCustomStaticPath } from '@/utils/getCustomStaticPath'; export const meta = { - title: 'Self-managed hosting (Preview)', + title: 'Self-managed hosting', description: 'Deploy your frontend to your own AWS account with full AWS CDK control.', route: '/[platform]/deploy-and-host/self-hosting', platforms: [ @@ -32,13 +32,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + Self-managed hosting gives you full ownership of your frontend infrastructure. You deploy to your own AWS account using AWS CDK constructs, giving you complete control over Amazon S3 buckets, Amazon CloudFront distributions, Lambda@Edge functions, and every other resource in your stack. diff --git a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx index c2301007b38..16fc19d46e9 100644 --- a/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx +++ b/src/pages/[platform]/deploy-and-host/self-hosting/secrets-and-environment-variables/index.mdx @@ -28,13 +28,7 @@ export function getStaticProps(context) { }; } -{/* PREVIEW-BANNER-START */} - - -**This feature is in preview.** It is not recommended for production workloads yet, and APIs may change before general availability. Share feedback or report issues on [GitHub](https://github.com/aws-amplify/amplify-backend/issues). - - -{/* PREVIEW-BANNER-END */} + Self-managed hosting distinguishes between three kinds of values you can make available to your server-side compute: