docs: add self-hosting documentation - #8605
Conversation
|
@adrianjoshua-strutt, since a file was deleted from the
|
|
Redirects are already configured in
All pages moved from |
| import { defineHosting } from '@aws-amplify/hosting'; | ||
|
|
||
| export const hosting = defineHosting({ | ||
| framework: 'nextjs' |
There was a problem hiding this comment.
Since we are auto detecting the framework, can omit this framework param and also it is already mentioned in configuration page.
There was a problem hiding this comment.
Will do. Thanks!
| import { defineHosting } from '@aws-amplify/hosting'; | ||
|
|
||
| export const hosting = defineHosting({ | ||
| framework: 'nextjs' |
There was a problem hiding this comment.
same here, Since we are auto detecting the framework, can omit this framework param and also it is already mentioned in configuration page.
3f94a6d to
48e921c
Compare
Adds documentation for the self-managed hosting feature (defineHosting, definePipeline, ampx deploy), restructures the deploy-and-host section into Amplify Hosting and Self-managed hosting, and adds preview labeling. RFC: aws-amplify/amplify-backend#3211
48e921c to
2a437c2
Compare
Corrections to match the shipped @aws-amplify/hosting 1.0.0 API:
- compute: remove nonexistent 'runtime' option
- cdn: replace nonexistent cachePolicy{defaultTtl,maxTtl} with ssrDefaultTtl (Duration); fix geoRestriction to { type, countries }
- storage: encryption 'S3' -> 'S3_MANAGED'
- pipeline: bakeTime is a Duration (was a number); computeType is ComputeType enum (was a string); fix getStageConfig() usage (undefined guard + .config nesting)
- pipeline: synth step synthesizes (cdk synth) instead of the invalid 'ampx deploy --frontend --backend' combo; 'ampx deploy --pipeline' cannot take --identifier
- frameworks: customAdapter is a FrameworkAdapterFn (function), not an object; add SvelteKit
- external pipelines: add --yes to all CI deploy commands (the command prompts otherwise) and document the flag
Content:
- add Secrets and environment variables page and wire nav + cross-links
- document default-on monitoring and skewProtection options
Release framing:
- remove preview banners and 'not for production' language; drop stale 'install the preview via RFC' instruction (ships as 1.0.0 on npm)
- cspell: add 'maxage', 'prerendered'
bobbor
left a comment
There was a problem hiding this comment.
left some small comments that require clarification
| name: 'production', | ||
| requireApproval: true, | ||
| bakeTime: 30, | ||
| bakeTime: Duration.minutes(30), |
There was a problem hiding this comment.
keep this a number pls.
similar to all other configurations where CDK durations are alternatives.
| const customAdapter: FrameworkAdapterFn = async (projectDir) => { | ||
| // Build your project, then return a DeployManifest that points the | ||
| // hosting construct at the built static assets and server handler. | ||
| return buildMyFrameworkManifest(projectDir); |
There was a problem hiding this comment.
by removing the example (serverEntry, buildCommand etc.) it is no longer clear what the custom adapter should do.
Also, is an (async) adapter function the only way to provide a custom adapter?
Preview: https://d2a8cehsb9j05d.cloudfront.net
Adds documentation for the self-managed hosting feature (
defineHosting,definePipeline,ampx deploy).Pages added
/deploy-and-host/self-hosting/— Overview/deploy-and-host/self-hosting/getting-started/— Install and first deploy/deploy-and-host/self-hosting/define-hosting/— Configure hosting (domains, WAF, compute, CDK escape hatches)/deploy-and-host/self-hosting/define-pipeline/— Set up CI/CD pipeline/deploy-and-host/self-hosting/external-pipelines/— GitHub Actions, GitLab CINavigation
Updated
src/directory/directory.mjsto add the self-hosting section under deploy-and-host.Related: aws-amplify/amplify-backend#3211