diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7d331ebe4df..03b62efd334 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -6,7 +6,7 @@
/src/**/cli/ @josefaidt @aws-amplify/documentation-team
#Studio
-/src/pages/console/ @wrpeck @aws-amplify/documentation-team
+/src/pages/console/ @dbanksdesign @aws-amplify/documentation-team
#Analytics
/src/**/**/analytics @abdallahshaban557 @aws-amplify/documentation-team
diff --git a/.github/workflows/check_bundle_size.yml b/.github/workflows/check_bundle_size.yml
new file mode 100644
index 00000000000..4f027033908
--- /dev/null
+++ b/.github/workflows/check_bundle_size.yml
@@ -0,0 +1,72 @@
+name: Check Bundle Size
+on:
+ pull_request:
+ branches: [main]
+jobs:
+ checkBundleSizeChange:
+ permissions:
+ pull-requests: read
+ name: Check whether PR increases bundle size more than 5%
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout main branch
+ uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 https://github.com/actions/checkout/commit/f43a0e5ff2bd294095638e18286ca9a3d1956744
+ with:
+ ref: main
+ - name: Setup Node.js 16.x
+ uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 https://github.com/actions/setup-node/commit/5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
+ with:
+ node-version: 16.x
+ - name: Install dependencies
+ run: yarn
+ - name: Run build and analyze base bundle sizes
+ env:
+ CURRENT_BRANCH: ${{ github.base_ref }}
+ CURRENT_REPO: ${{ github.repository }}
+ NODE_OPTIONS: --max_old_space_size=4096
+ run: ANALYZE=true yarn next-build
+ - name: Check base bundle size of select pages
+ uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
+ id: base-bundle-sizes
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const { checkBundleSize } = require('./.github/workflows/scripts/check_bundle_size.js');
+ return checkBundleSize();
+ - name: Checkout PR branch
+ uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 https://github.com/actions/checkout/commit/f43a0e5ff2bd294095638e18286ca9a3d1956744
+ with:
+ ref: ${{ github.head_ref }}
+ - name: Setup Node.js 16.x
+ uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v.3.8.1 https://github.com/actions/setup-node/commit/5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
+ with:
+ node-version: 16.x
+ - name: Install dependencies
+ run: yarn
+ - name: Run build and analyze head bundle sizes
+ env:
+ CURRENT_BRANCH: ${{ github.head_ref }}
+ CURRENT_REPO: ${{ github.repository }}
+ NODE_OPTIONS: --max_old_space_size=4096
+ run: ANALYZE=true yarn next-build
+ - name: Check head bundle size of select pages
+ uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
+ id: head-bundle-sizes
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const { checkBundleSize } = require('./.github/workflows/scripts/check_bundle_size.js');
+ return checkBundleSize();
+ - name: Compare bundle page bundle sizes
+ uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
+ id: compare-bundles
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const { compareBundles } = require('./.github/workflows/scripts/check_bundle_size.js');
+ const baseBundles = ${{ steps.base-bundle-sizes.outputs.result }}
+ const headBundles = ${{ steps.head-bundle-sizes.outputs.result }}
+ return await compareBundles(baseBundles, headBundles)
+ - name: Fail if bundle size growth exceeds 5% on any of the selected pages
+ if: ${{ steps.compare-bundles.outputs.result > 0 }}
+ run: exit 1
diff --git a/.github/workflows/check_for_broken_links.yml b/.github/workflows/check_for_broken_links.yml
index 98afe5688ec..f53a73f8b43 100644
--- a/.github/workflows/check_for_broken_links.yml
+++ b/.github/workflows/check_for_broken_links.yml
@@ -24,8 +24,8 @@ jobs:
with:
result-encoding: string
script: |
- const { checkLinks } = require('./tasks/link-checker.js');
- return await checkLinks();
+ const { checkProdLinks } = require('./tasks/link-checker.js');
+ return await checkProdLinks();
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
diff --git a/.github/workflows/check_for_console_errors.yml b/.github/workflows/check_for_console_errors.yml
new file mode 100644
index 00000000000..3ac44fcf706
--- /dev/null
+++ b/.github/workflows/check_for_console_errors.yml
@@ -0,0 +1,39 @@
+name: CheckConsoleErrors
+on:
+ pull_request:
+ branches: [main]
+ types: [opened, synchronize]
+permissions:
+ contents: read
+ id-token: write
+jobs:
+ CheckConsoleErrors:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 https://github.com/actions/checkout/commit/f43a0e5ff2bd294095638e18286ca9a3d1956744
+ - name: Setup Node.js 16.x
+ uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 https://github.com/actions/setup-node/commit/e33196f7422957bea03ed53f6fbb155025ffc7b8
+ with:
+ node-version: 16.x
+ - name: Install Dependencies
+ run: yarn
+ - name: Run Build
+ run: yarn build
+ env:
+ NODE_OPTIONS: --max_old_space_size=4096
+ - name: Run Server
+ run: |
+ node ./node_modules/.bin/serve client/www/next-build --no-request-logging &
+ sleep 5
+ - name: Run Console Errors
+ id: consoleErrors
+ uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
+ with:
+ result-encoding: string
+ script: |
+ const { consoleErrors } = require('./tasks/console-errors.js');
+ return await consoleErrors();
+ - name: Fail if console errors have been found
+ if: ${{ steps.consoleErrors.outputs.result }}
+ run: exit 1
diff --git a/.github/workflows/check_pr_for_broken_links.yml b/.github/workflows/check_pr_for_broken_links.yml
new file mode 100644
index 00000000000..616e9ebfc83
--- /dev/null
+++ b/.github/workflows/check_pr_for_broken_links.yml
@@ -0,0 +1,36 @@
+name: CheckPRLinks
+on:
+ pull_request:
+ branches: [main]
+ types: [opened, synchronize]
+jobs:
+ CheckPRLinks:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 https://github.com/actions/checkout/commit/f43a0e5ff2bd294095638e18286ca9a3d1956744
+ - name: Setup Node.js 16.x
+ uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 https://github.com/actions/setup-node/commit/e33196f7422957bea03ed53f6fbb155025ffc7b8
+ with:
+ node-version: 16.x
+ - name: Install Dependencies
+ run: yarn
+ - name: Run Build
+ run: yarn build
+ env:
+ NODE_OPTIONS: --max_old_space_size=4096
+ - name: Run Server
+ run: |
+ node ./node_modules/.bin/serve client/www/next-build --no-request-logging &
+ sleep 5
+ - name: Run Link Checker
+ id: checkLinks
+ uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
+ with:
+ result-encoding: string
+ script: |
+ const { checkDevLinks } = require('./tasks/link-checker.js');
+ return await checkDevLinks();
+ - name: Fail if broken links have been found
+ if: ${{ steps.checkLinks.outputs.result }}
+ run: exit 1
diff --git a/.github/workflows/scripts/check_bundle_size.js b/.github/workflows/scripts/check_bundle_size.js
new file mode 100644
index 00000000000..2eba431efb2
--- /dev/null
+++ b/.github/workflows/scripts/check_bundle_size.js
@@ -0,0 +1,47 @@
+module.exports = {
+ checkBundleSize: () => {
+ const fs = require('fs');
+ const jsonString = fs.readFileSync('.github/analyze/bundles.json');
+ const data = JSON.parse(jsonString);
+ const pagesToCheck = [
+ '/',
+ '/cli/start/install',
+ '/lib/auth/getting-started/q/platform/[platform]',
+ '/start',
+ '/cli'
+ ];
+ const bundleSizes = [];
+ data.pages.filter((page) => {
+ if (pagesToCheck.includes(page.label)) {
+ bundleSizes.push({
+ page: page.label,
+ gzipSize: page.gzipSize,
+ parsedSize: page.parsedSize,
+ statSize: page.statSize,
+ totalGzipSize: page.totalGzipSize,
+ totalParsedSize: page.totalParsedSize,
+ totalStatSize: page.totalStatSize
+ });
+ }
+ });
+ return bundleSizes;
+ },
+
+ compareBundles: (baseBundles, headBundles) => {
+ const fails = [];
+ baseBundles.forEach((basePage) => {
+ headBundles.forEach((headPage) => {
+ if (
+ basePage.page == headPage.page &&
+ basePage.parsedSize * 1.05 < headPage.parsedSize
+ ) {
+ fails.push(basePage.page);
+ }
+ });
+ });
+ console.log(
+ `The bundle size of ${fails} increased by more than 5% with this PR`
+ );
+ return fails.length;
+ }
+};
diff --git a/Readme.md b/Readme.md
index e31e5ee9231..c11fbea6267 100644
--- a/Readme.md
+++ b/Readme.md
@@ -13,18 +13,20 @@
1. [Fork this repo](/fork) and `git clone` it.
2. In your terminal, navigate to the repo from where it was just cloned. This should be located at the `/docs` directory.
-2. From your command line, run `yarn && yarn dev`.
-3. should open automatically.
+3. From your command line, run `yarn && yarn dev`.
+4. should open automatically.
## How to contribute
We welcome contributions to the documentation site! Here's how to do it:
1. Follow our [styleguide](https://github.com/aws-amplify/docs/blob/main/STYLEGUIDE.md), especially if writing longer pieces.
-2. Verify your changes locally.
+2. Verify your changes locally.
3. Make a PR to our `main` branch.
- 1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
- 2. If any files have been deleted with your PR, please indicate that `redirects are needed` in your PR description and/or add the `redirects-needed` label.
+ 1. Please include any [issues](https://github.com/aws-amplify/docs/issues) your PR addresses.
+ 2. If any files have been deleted with your PR, please add the redirects required to [`redirects.json`](https://github.com/aws-amplify/docs/blob/main/redirects.json) and ensure that the `redirects-needed` label has been added.
+ - Please see the [Amplify Hosting user guide](https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html) for guidance on values and ordering.
+ - Please note that there is a manual step for the Docs Engineering team to complete before the redirects are live.
**What's next?** After your PR is reviewed and all tests pass, it will be merged and the branch will be deleted.
@@ -48,50 +50,51 @@ IMPORTANT: Every page has to have a `title` and `description` meta field.
The markdown body is parsed as [MDX](https://mdxjs.com/) and can include any valid HTML or JSX.
### Fragments
+
To incorporate new platform-specific content within a page, please use [Inline Filters](https://github.com/aws-amplify/docs/blob/main/Readme.md#inline-filters).
When editing content that hasn't been migrated, you may see the following pattern:
```jsx
-import js from "/src/fragments/lib/datastore/js/conflict.mdx";
+import js from '/src/fragments/lib/datastore/js/conflict.mdx';
-;
+;
```
This pattern incorporates fragment files into a page and conditionally renders content based off selected platform added as a condition to the `Fragments` tag.
This fragment would exist in: `pages/src/fragments/lib/datastore/js/conflict.mdx`
-### Inline Filters
+### Inline Filters
We are incorporating the use of `` to add platform-specific content within the context of one page rather than in fragments. These filters allow you to still specify content by platform and they reference platforms using the same naming convention as our fragments. You can enclose your platform-specific content by updating the opening tag:
-````md
+```md
-````
-
+```
+
If you are updating content on a page, please note any inline filter tags which may be indicating a specific platform as you make your edits.
-### Accordion
+### Accordion
`Accordion` This single-use accordion hides peripheral content until the reader selects to expand the section. This helps you keep your pages focused on the need-to-know information upfront, while also providing readers an option to dive deeper when they choose. These accordions can provide peripheral content such as additional context for beginners, advanced deep dives for those who want to off-road, and troubleshooting guidance for errors users may encounter.
Here is an example of its usage:
-````md
+```md
- Title – Make your title descriptive to help readers know what the accordion contains before they click.
- Heading Level – Keep the heading level consistent with your page hierarchy.
- Eyebrow – Update this text to reflect the purpose of the accordion. We recommend:
- - Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
- - Troubleshooting – used when adding details to troubleshoot specific errors within context.
- - Walkthrough – used when adding a step-by-step example for those who need more direct guidance.
+ - Learn more – used to add additional context that is not needed upfront but is useful for users to review when they choose.
+ - Troubleshooting – used when adding details to troubleshoot specific errors within context.
+ - Walkthrough – used when adding a step-by-step example for those who need more direct guidance.
-````
+```
### Tab-switchable Blocks
@@ -103,7 +106,7 @@ Here is an example of its usage:
```js
-const a = "a";
+const a = 'a';
```
@@ -111,7 +114,7 @@ const a = "a";
```ts
-const a: "a" = "a";
+const a: 'a' = 'a';
```
@@ -130,23 +133,26 @@ let mut a = String::from("a");
## Debug client-side code with browser developer tools
### Prerequisites
-- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
- - [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
- - [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
+
+- [React Dev Tools](https://reactjs.org/tutorial/tutorial.html#developer-tools)
+ - [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)
+ - [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)
### To debug
+
1. Set up the repo and run it with the `dev` script mentioned above in the "Getting Started" section.
2. On your localhost page, go to the page with the React component you want to debug and open up the developer tools.
3. To know which source file to breakpoint on, we need to find the name of the component first.
- - Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.
- - Search for the variable/component name inside the source code to find the file you want to debug.
+ - Open up the dev tools and use the react dev tools to find the component. Do this by using the "Select an element on the page to inspect it" tool under the "Components" tab.
+
+ - Search for the variable/component name inside the source code to find the file you want to debug.
+
+ - Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
+ - Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"
- - Place the breakpoint inside the file under the "Sources" tab in the browser's dev tools.
- - Note that since the Amplify Docs site is built with nextjs, file paths will start with "`webpack://_N_E/./`"
4. Refresh your localhost site and the breakpoint should hit in the browser's dev tools. You should be able to debug the code.
Another way to find which file you want to debug is to search for strings/paragraphs seen in Amplify docs site. Search for the strings in your code editor and you'll find that they will be in a `.mdx` file. You should see the components that are being rendered and be able to find the file name you want to debug.
-
More info on debugging can be found here: https://nextjs.org/docs/advanced-features/debugging
diff --git a/amplify.yml b/amplify.yml
index 5727377e1e3..dd49ec9a204 100644
--- a/amplify.yml
+++ b/amplify.yml
@@ -8,6 +8,7 @@ frontend:
build:
commands:
- echo "BUILD_ENV=$BUILD_ENV" >> .env.custom
+ - node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
- NODE_ENV=production yarn build:release
- if [ "${AWS_BRANCH}" = "main" ]; then node tasks/build-algolia-search.mjs; fi
artifacts:
diff --git a/cspell.json b/cspell.json
index b7c993fba63..18238c22ba7 100644
--- a/cspell.json
+++ b/cspell.json
@@ -1522,7 +1522,9 @@
"cloudwatchlogs",
"userids",
"xmark",
- "refreshable"
+ "refreshable",
+ "querytransfers",
+ "generatemodelsforlazyloadandcustomselectionset"
],
"flagWords": ["hte", "full-stack", "Full-stack", "Full-Stack", "sudo"],
"patterns": [
diff --git a/customHttp.yml b/customHttp.yml
index a0e2cf70ef8..898decf42da 100644
--- a/customHttp.yml
+++ b/customHttp.yml
@@ -13,5 +13,5 @@ customHeaders:
- key: 'X-Content-Type-Options'
value: 'nosniff'
- key: 'Content-Security-Policy'
- value: "upgrade-insecure-requests; default-src 'none'; prefetch-src 'self'; style-src 'self' 'unsafe-inline' *.shortbread.aws.dev; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://aws.amazon.com/ https://d2c-alpha.dse.marketing.aws.a2z.com https://aws-mktg-csds-alpha.integ.amazon.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; img-src 'self' https://img.shields.io https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; media-src 'self'; script-src 'self' *.shortbread.aws.dev https://a0.awsstatic.com/ https://aa0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://d2c.aws.amazon.com/;"
+ value: "upgrade-insecure-requests; default-src 'none'; style-src 'self' 'unsafe-inline' *.shortbread.aws.dev; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://aws.amazon.com/ https://d2c-alpha.dse.marketing.aws.a2z.com https://aws-mktg-csds-alpha.integ.amazon.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; img-src 'self' https://img.shields.io https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; media-src 'self'; script-src 'self' *.shortbread.aws.dev https://a0.awsstatic.com/ https://aa0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://d2c.aws.amazon.com/;"
# CSP also set in _document.tsx meta tag
diff --git a/generatePathMap.cjs.js b/generatePathMap.cjs.js
index 6bd8dab43b6..536dbc72e4e 100644
--- a/generatePathMap.cjs.js
+++ b/generatePathMap.cjs.js
@@ -67,6 +67,9 @@ function generatePathMap(
'/lib-v1/q/platform/js': {
page: '/lib-v1/q/platform/[platform]'
},
+ '/lib-v1/q/platform/react-native': {
+ page: '/lib-v1/q/platform/[platform]'
+ },
'/sdk/q/platform/js': {
page: '/sdk/q/platform/[platform]'
},
@@ -79,6 +82,9 @@ function generatePathMap(
'/sdk/q/platform/flutter': {
page: '/sdk/q/platform/[platform]'
},
+ '/sdk/q/platform/react-native': {
+ page: '/sdk/q/platform/[platform]'
+ },
'/console': {
page: '/console'
},
@@ -120,19 +126,6 @@ function generatePathMap(
} else if (route.startsWith('/start')) {
filterKind = 'integration';
}
-
- if (filterKind !== '') {
- const aOrAn = 'aeiou'.includes(filterKind[0]) ? 'an' : 'a';
- pathMap[route] = {
- page: '/ChooseFilterPage',
- query: {
- address: route,
- directoryPath: '/ChooseFilterPage',
- filterKind: filterKind,
- message: `Choose ${aOrAn} ${filterKind}:`
- }
- };
- }
}
if (items) {
@@ -202,17 +195,6 @@ function generatePathMap(
page: `${route}/q/${routeType}/[${routeType}]`
};
});
- const aOrAn = 'aeiou'.includes(routeType[0]) ? 'an' : 'a';
- pathMap[route] = {
- page: '/ChooseFilterPage',
- query: {
- address: route,
- directoryPath: '/ChooseFilterPage',
- filterKind: routeType,
- filters: filters,
- message: `Choose ${aOrAn} ${routeType}:`
- }
- };
}
return pathMap;
}
diff --git a/next.config.mjs b/next.config.mjs
index 5ae8c33344f..6345904b2f5 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -12,6 +12,8 @@ const mdxRenderer = `
`;
+const shouldAnalyzeBundles = process.env.ANALYZE === 'true';
+
export default async (phase, { defaultConfig }) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const headingLinkPlugin = await require('./src/plugins/headings.tsx');
@@ -41,7 +43,9 @@ export default async (phase, { defaultConfig }) => {
}
});
- const nextConfig = withMDX({
+ let nextConfig = withMDX({
+ output: 'export',
+ distDir: 'client/www/next-build',
env: {
BUILD_ENV: process.env.BUILD_ENV,
nextImageExportOptimizer_imageFolderPath: 'public',
@@ -68,37 +72,27 @@ export default async (phase, { defaultConfig }) => {
// !! WARN !!
ignoreBuildErrors: true
},
- exportPathMap,
trailingSlash: true,
- transpilePackages: ['@algolia/autocomplete-shared', 'next-image-export-optimizer'],
- // eslint-disable-next-line @typescript-eslint/require-await
- async headers() {
- return [
- {
- // Apply these headers to all routes in your application.
- source: '/(.*)',
- headers: [
- // IMPORTANT:
- // These are ONLY used for the Dev server and MUST
- // be kept in sync with customHttp.yml
- {
- key: 'Strict-Transport-Security',
- value: 'max-age=63072000; includeSubDomains'
- },
- {
- key: 'X-Frame-Options',
- value: 'SAMEORIGIN'
- },
- {
- key: 'X-Content-Type-Options',
- value: 'nosniff'
- }
- ]
- }
- ];
- }
+ transpilePackages: [
+ '@algolia/autocomplete-shared',
+ 'next-image-export-optimizer'
+ ]
});
+ if (shouldAnalyzeBundles) {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ const withNextBundleAnalyzer = require('next-bundle-analyzer')({
+ format: ['json'],
+ reportDir: '../.github/analyze',
+ json: {
+ filter: {
+ pages: true
+ }
+ }
+ });
+ nextConfig = withNextBundleAnalyzer(nextConfig);
+ }
+
return nextConfig;
};
diff --git a/package.json b/package.json
index 218bfcf79ae..69df25d8227 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"@algolia/autocomplete-shared": "^1.5.6",
"@algolia/autocomplete-theme-classic": "^1.6.1",
"@algolia/client-search": "^4.13.0",
- "@aws-amplify/amplify-cli-core": "^4.2.7",
+ "@aws-amplify/amplify-cli-core": "^4.2.10",
"@aws-amplify/ui-react": "^5.3.1",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.3.0",
@@ -25,6 +25,7 @@
"array-flatten": "^3.0.0",
"aws-amplify": "^5.0.5",
"copy-to-clipboard": "^3.2.1",
+ "cross-env": "^7.0.3",
"dotenv": "^16.0.0",
"emotion": "^10.0.23",
"eslint-config-next": "^13.2.4",
@@ -32,7 +33,7 @@
"gray-matter": "4.0.3",
"html-entities": "^1.2.1",
"instantsearch.js": "^4.39.1",
- "next": "^13.2.4",
+ "next": "^13.5.6",
"next-image-export-optimizer": "^1.8.3",
"next-transpile-modules": "^9.0.0",
"parse-imports": "^1.1.0",
@@ -53,6 +54,7 @@
},
"devDependencies": {
"@mdx-js/loader": "^1.6.22",
+ "@next/bundle-analyzer": "^13.5.3",
"@next/mdx": "^10.1.3",
"@stencil/core": "^1.17.0",
"@stencil/eslint-plugin": "^0.2.1",
@@ -80,10 +82,12 @@
"husky": "^8.0.1",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
+ "next-bundle-analyzer": "^0.6.7",
"prettier": "^1.19.1",
"puppeteer": "^20.8.2",
"rollup-plugin-node-polyfills": "^0.2.1",
"sass": "^1.54.8",
+ "serve": "^14.2.1",
"tiny-glob": "0.2.9",
"ts-jest": "^26.0.3",
"ts-node": "^8.5.0",
@@ -92,6 +96,8 @@
},
"resolutions": {
"**/trim": "0.0.3",
+ "@babel/core": "^7.23.2",
+ "@babel/traverse": "^7.23.2",
"loader-utils": "2.0.4",
"minimatch": "3.1.2",
"json5": "2.2.2",
@@ -123,7 +129,11 @@
],
"setupFilesAfterEnv": [
"/jest.setup.js"
- ]
+ ],
+ "moduleNameMapper": {
+ "\\.(css|less|scss)$": "/src/__mocks__/styleMock.js"
+ },
+ "transformIgnorePatterns": []
},
"scripts": {
"clean": "rm -rf node_modules yarn.lock",
@@ -132,10 +142,12 @@
"dev": "next dev",
"spellcheck": "cspell \"src/**/*.mdx\" --no-progress",
"spellcheck-diff": "git diff --name-only --cached | awk \"/src.*\\.mdx/{print}\" | npx cspell --no-must-find-files --file-list stdin",
- "build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build",
+ "build": "node tasks/generate-sitemap.mjs && next build",
"build:release": "yarn build && next-image-export-optimizer --exportFolderPath client/www/next-build",
"next-build": "next build",
"next-start": "next start",
- "prepare": "husky install"
+ "amplify:submissionsLambda": "cd amplify/backend/function/submissionsLambda/src && yarn install && yarn build && yarn test",
+ "prepare": "husky install",
+ "analyze": "ANALYZE=true yarn next-build"
}
}
diff --git a/public/images/gen-ai/build-settings.png b/public/images/gen-ai/build-settings.png
new file mode 100644
index 00000000000..47c8c33b7c7
Binary files /dev/null and b/public/images/gen-ai/build-settings.png differ
diff --git a/public/images/gen-ai/claude.png b/public/images/gen-ai/claude.png
new file mode 100644
index 00000000000..274f4e7c7a6
Binary files /dev/null and b/public/images/gen-ai/claude.png differ
diff --git a/public/images/gen-ai/login-form.png b/public/images/gen-ai/login-form.png
new file mode 100644
index 00000000000..b0358b2a243
Binary files /dev/null and b/public/images/gen-ai/login-form.png differ
diff --git a/public/images/how-amplify-works/amplify-flow.png b/public/images/how-amplify-works/amplify-flow.png
new file mode 100644
index 00000000000..254f692b9ec
Binary files /dev/null and b/public/images/how-amplify-works/amplify-flow.png differ
diff --git a/public/images/how-amplify-works/amplify-scenarios.png b/public/images/how-amplify-works/amplify-scenarios.png
new file mode 100644
index 00000000000..7714d666ed9
Binary files /dev/null and b/public/images/how-amplify-works/amplify-scenarios.png differ
diff --git a/public/images/how-amplify-works/checkmark.png b/public/images/how-amplify-works/checkmark.png
new file mode 100644
index 00000000000..7647bea24b9
Binary files /dev/null and b/public/images/how-amplify-works/checkmark.png differ
diff --git a/public/images/how-amplify-works/figma-to-code.png b/public/images/how-amplify-works/figma-to-code.png
new file mode 100644
index 00000000000..2bcf9fc1869
Binary files /dev/null and b/public/images/how-amplify-works/figma-to-code.png differ
diff --git a/public/images/how-amplify-works/hosting-deployed-site.png b/public/images/how-amplify-works/hosting-deployed-site.png
new file mode 100644
index 00000000000..177a33e28be
Binary files /dev/null and b/public/images/how-amplify-works/hosting-deployed-site.png differ
diff --git a/public/images/how-amplify-works/hosting-form.png b/public/images/how-amplify-works/hosting-form.png
new file mode 100644
index 00000000000..4fa2e5b2856
Binary files /dev/null and b/public/images/how-amplify-works/hosting-form.png differ
diff --git a/public/images/how-amplify-works/ui-library-form-builder.png b/public/images/how-amplify-works/ui-library-form-builder.png
new file mode 100644
index 00000000000..7da49930723
Binary files /dev/null and b/public/images/how-amplify-works/ui-library-form-builder.png differ
diff --git a/public/images/how-amplify-works/ui-library-primitive-components.png b/public/images/how-amplify-works/ui-library-primitive-components.png
new file mode 100644
index 00000000000..b2004117de8
Binary files /dev/null and b/public/images/how-amplify-works/ui-library-primitive-components.png differ
diff --git a/public/images/how-amplify-works/ui-library-sign-in.png b/public/images/how-amplify-works/ui-library-sign-in.png
new file mode 100644
index 00000000000..680bfb7b589
Binary files /dev/null and b/public/images/how-amplify-works/ui-library-sign-in.png differ
diff --git a/redirects.json b/redirects.json
new file mode 100644
index 00000000000..e75c9b093d2
--- /dev/null
+++ b/redirects.json
@@ -0,0 +1,308 @@
+[
+ {
+ "source": "/lib/ssr/ssr/q/platform/js/",
+ "target": "/lib/ssr/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/function/function/",
+ "target": "/cli/function/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/ssr/ssr/",
+ "target": "/lib/ssr/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/plugins/",
+ "target": "/cli/plugins/plugins/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/<*>",
+ "target": "/404/index.html",
+ "status": "404-200",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/tags/",
+ "target": "/cli/project/tags/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/permissions-boundary/",
+ "target": "/cli/project/permissions-boundary/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/command-hooks/",
+ "target": "/cli/project/command-hooks/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/monorepo/",
+ "target": "/cli/project/monorepo/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/iam/",
+ "target": "/cli/reference/iam/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/iam-roles-mfa/",
+ "target": "/cli/reference/iam-roles-mfa/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/customcf/",
+ "target": "/cli/custom/cloudformation/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/upgrade/",
+ "target": "/cli/start/workflows/#upgrade-amplify-cli",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/uninnstall/",
+ "target": "/cli/start/workflows/#uninstall-amplify-cli",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/graphql-transformer/<*>",
+ "target": "/cli-legacy/graphql-transformer/<*>",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli-legacy/",
+ "target": "/cli/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/console/adminui/intro/",
+ "target": "/console",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/ui-legacy/interactions/chatbot/<*>",
+ "target": "https://ui.docs.amplify.aws/components/chatbot",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/ui/customization/theming/q/framework/react/",
+ "target": "https://ui.docs.amplify.aws/theming",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/hosting/",
+ "target": "/cli/hosting/hosting",
+ "status": "302",
+ "condition": null
+ },
+ {
+ "source": "/ui/storage/s3-image-picker/q/framework//",
+ "target": "https://ui.docs.amplify.aws/components/storage?platform=#s3-image-picker",
+ "status": "302",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/uninstall/",
+ "target": "/cli/start/workflows/#uninstall-amplify-cli",
+ "status": "302",
+ "condition": null
+ },
+ {
+ "source": "/guides/location-service/setting-up-your-app/q/platform/js/",
+ "target": "/lib/geo/getting-started/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/guides/location-service/setting-up-your-app/q/platform/ios/",
+ "target": "/lib/geo/getting-started/q/platform/ios/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/guides/location-service/setting-up-your-app/q/platform/android/",
+ "target": "/lib/geo/getting-started/q/platform/android/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/guides/location-service/tracking-device-location/q/platform/ios/",
+ "target": "/lib/geo/escapehatch/q/platform/ios/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/guides/location-service/tracking-device-location/q/platform/android/",
+ "target": "/lib/geo/escapehatch/q/platform/android/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/auth/social_signin_web_ui/q/platform/ios/",
+ "target": "/lib/auth/social/q/platform/ios/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/auth/social_signin_web_ui/q/platform/android/",
+ "target": "/lib/auth/social/q/platform/android",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/auth/social_signin_web_ui/q/platform/flutter/",
+ "target": "/lib/auth/social/q/platform/flutter/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/start/q/integration/ionic/",
+ "target": "/start/q/integration/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/start/getting-started/installation/q/integration/ionic/",
+ "target": "/start/getting-started/installation/q/integration/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/in-app-messaging/prerequisites/q/platform/js/",
+ "target": "/lib/in-app-messaging/getting-started/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/devpreview/getting-started/q/platform/android/",
+ "target": "/lib/project-setup/upgrade-guide/q/platform/android/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/devpreview/getting-started/q/platform/ios/",
+ "target": "/lib/project-setup/upgrade-guide/q/platform/ios/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/migration/lambda-node-version-update/",
+ "target": "/cli/function/configure-options/#updating-the-runtime",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/in-app-messaging/customize/q/platform/js/",
+ "target": "https://ui.docs.amplify.aws/react/connected-components/in-app-messaging",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/guides/storage/transfer-acceleration/q/platform/js/",
+ "target": "/lib/storage/transfer-acceleration/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/auth/customui/q/platform/js/",
+ "target": "https://ui.docs.amplify.aws/react/connected-components/authenticator",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/auth/customui/q/platform/react-native/",
+ "target": "https://ui.docs.amplify.aws/react-native/connected-components/authenticator",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/graphqlapi/create-or-re-use-existing-backend/q/platform/js",
+ "target": "/lib/graphqlapi/existing-resources/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/console/uibuilder/textfieldtoarea/",
+ "target": "/console/uibuilder/figmatocode/#figma-file-changelog",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/graphql/offline-data-access-and-conflict-resolution/",
+ "target": "/lib/datastore/conflict/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/console/storage/develop",
+ "target": "/console/storage/file-browser/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/cli/usage/add-custom-resources",
+ "target": "/cli/custom/cdk/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/push-notifications/overview/q/platform/react-native/",
+ "target": "/lib/push-notifications/getting-started/q/platform/react-native",
+ "status": "302",
+ "condition": null
+ },
+ {
+ "source": "/lib/push-notifications/working-with-api/q/platform/react-native/",
+ "target": "/lib/push-notifications/getting-started/q/platform/react-native",
+ "status": "302",
+ "condition": null
+ },
+ {
+ "source": "/ui/<*>",
+ "target": "https://ui.docs.amplify.aws/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/ui-legacy/<*>",
+ "target": "https://ui.docs.amplify.aws/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/graphqlapi/create-or-re-use-existing-backend/q/platform/js/",
+ "target": "/lib/graphqlapi/existing-resources/q/platform/js/",
+ "status": "301",
+ "condition": null
+ },
+ {
+ "source": "/lib/push-notifications/overview/q/platform/js/",
+ "target": "/lib/push-notifications/getting-started/q/platform/react-native/",
+ "status": "301",
+ "condition": null
+ }
+]
diff --git a/src/__mocks__/styleMock.js b/src/__mocks__/styleMock.js
new file mode 100644
index 00000000000..f053ebf7976
--- /dev/null
+++ b/src/__mocks__/styleMock.js
@@ -0,0 +1 @@
+module.exports = {};
diff --git a/src/components/Accordion/icons.tsx b/src/components/Accordion/icons.tsx
index bf8c9e80edc..094cfc11274 100644
--- a/src/components/Accordion/icons.tsx
+++ b/src/components/Accordion/icons.tsx
@@ -12,7 +12,7 @@ export const Expand = () => {
export const DeepDive = () => {
return (
-
+
);
};
diff --git a/src/components/Accordion/index.tsx b/src/components/Accordion/index.tsx
index f861f4a74f8..6a4a59e323f 100644
--- a/src/components/Accordion/index.tsx
+++ b/src/components/Accordion/index.tsx
@@ -20,6 +20,11 @@ const Accordion: React.FC = ({
const [expandedHeight, setExpandedHeight] = useState(0);
const docsExpander = useRef(null);
+ let pathName = '';
+ if (typeof window !== 'undefined') {
+ pathName = window.location.pathname;
+ }
+
useEffect(() => {
const expander = docsExpander.current;
@@ -62,7 +67,7 @@ const Accordion: React.FC = ({
const anchor = createElement(
'a',
- { href: window.location.pathname + '#' + headingId },
+ { href: pathName + '#' + headingId },
expanderTitle
);
diff --git a/src/pages/ChooseFilterPage.tsx b/src/components/ChooseFilterPage/index.tsx
similarity index 84%
rename from src/pages/ChooseFilterPage.tsx
rename to src/components/ChooseFilterPage/index.tsx
index 3ebc75f5792..2613a6b35bc 100644
--- a/src/pages/ChooseFilterPage.tsx
+++ b/src/components/ChooseFilterPage/index.tsx
@@ -1,19 +1,19 @@
-import Layout from '../components/Layout';
+import Layout from '../Layout';
import styled from '@emotion/styled';
import { Grid } from '@theme-ui/components';
import { useEffect, useRef, useState } from 'react';
-import MetaContent from '../components/Page/metaContent';
-import { Container } from '../components/Container';
-import { Card, CardDetail, CardGraphic } from '../components/Card';
+import MetaContent from '../Page/metaContent';
+import { Container } from '../Container';
+import { Card, CardDetail, CardGraphic } from '../Card';
import {
filterOptionsByName,
filterMetadataByOption
-} from '../utils/filter-data';
+} from '../../utils/filter-data';
import {
getChapterDirectory,
getProductDirectory,
isProductRoot
-} from '../utils/getLocalDirectory';
+} from '../../utils/getLocalDirectory';
const H3 = styled.h3`
margin-top: 0.375rem;
@@ -34,7 +34,6 @@ function ChooseFilterPage({
// "url" cannot be a CFP prop for legacy reasons
let url = address;
const [_, setHref] = useState('https://docs.amplify.aws');
- const [menuIsOpen, setMenuIsOpen] = useState(false);
const footerRef = useRef(null);
useEffect(() => {
@@ -54,11 +53,16 @@ function ChooseFilterPage({
if (typeof chapterDirectory !== 'undefined') {
const { title: cTitle, items } = chapterDirectory as {
title: string;
- items: { route: string; title: string }[];
+ items: { route: string; title: string, filters?: string[] }[];
};
chapterTitle = cTitle;
for (const item of items) {
- if (item.route === url) title = item.title;
+ if (item.route === url){
+ title = item.title;
+ if(item.filters){
+ filters = item.filters;
+ }
+ }
}
}
}
@@ -125,7 +129,4 @@ function ChooseFilterPage({
);
}
-ChooseFilterPage.getInitialProps = (initialProps) => {
- return initialProps.query;
-};
export default ChooseFilterPage;
diff --git a/src/components/FeatureFlags/feature-flags.json b/src/components/FeatureFlags/feature-flags.json
index f45b6ba10e0..a2e95d99bf9 100644
--- a/src/components/FeatureFlags/feature-flags.json
+++ b/src/components/FeatureFlags/feature-flags.json
@@ -639,7 +639,7 @@
]
},
"enableDartNullSafety": {
- "description": "Generate Dart models with null safety for Flutter applications using DataStore. Refer to https://docs.amplify.aws/lib/project-setup/null-safety/q/platform/flutter for more information",
+ "description": "Generate Dart models with null safety for Flutter applications using DataStore.",
"type": "Feature",
"valueType": "Boolean",
"versionAdded": "5.1.0",
diff --git a/src/components/FeaturesGrid/__tests__/FeaturesGrid.test.tsx b/src/components/FeaturesGrid/__tests__/FeaturesGrid.test.tsx
index 7b4fa1e8fc7..50e2284148d 100644
--- a/src/components/FeaturesGrid/__tests__/FeaturesGrid.test.tsx
+++ b/src/components/FeaturesGrid/__tests__/FeaturesGrid.test.tsx
@@ -2,6 +2,17 @@ import * as React from 'react';
import { render, screen } from '@testing-library/react';
import FeaturesGrid from '../index';
+jest.mock('next/router', () => ({
+ useRouter() {
+ return {
+ route: '/',
+ pathname: '',
+ query: '',
+ asPath: ''
+ };
+ }
+}));
+
describe('FeaturesGrid', () => {
const featureSections = [
'Authentication',
diff --git a/src/components/FeaturesGrid/index.tsx b/src/components/FeaturesGrid/index.tsx
index 341729d3b17..089364049a5 100644
--- a/src/components/FeaturesGrid/index.tsx
+++ b/src/components/FeaturesGrid/index.tsx
@@ -25,26 +25,35 @@ export default function FeaturesGrid() {
-
-
+
+
-
Storage
+
+ GraphQL API{' '}
+
+ Supports AWS CDK
+
+
- A simple mechanism for managing user content in public,
- protected or private storage
+ Easy and secure solution to access your backend data with
+ support for real-time updates using GraphQL
-
-
+
+
-
GraphQL API
+
Storage
- Easy and secure solution to access your backend data with
- support for real-time updates using GraphQL
+ A simple mechanism for managing user content in public,
+ protected or private storage
diff --git a/src/components/FilterChildren/index.tsx b/src/components/FilterChildren/index.tsx
index fb81abdc9e1..ffb2847138e 100644
--- a/src/components/FilterChildren/index.tsx
+++ b/src/components/FilterChildren/index.tsx
@@ -1,9 +1,8 @@
import { useRouter } from 'next/router';
-export default function FilterChildren({ children }) {
+export default function FilterChildren({ children, filterKey = '' }) {
const router = useRouter();
- let filterKey = '';
if ('platform' in router.query) {
filterKey = router.query.platform as string;
} else if ('integration' in router.query) {
diff --git a/src/components/Fragments/index.tsx b/src/components/Fragments/index.tsx
index e953399107f..72cde1196e9 100644
--- a/src/components/Fragments/index.tsx
+++ b/src/components/Fragments/index.tsx
@@ -7,8 +7,10 @@ export default function Fragments({ fragments }) {
let frontmatter: MdxFrontmatterType;
const { state, dispatch } = useLastUpdatedDatesContext();
+ let filterKey = '';
for (const key in fragments) {
+ if (!filterKey) filterKey = key;
const fragment = fragments[key]([]);
frontmatter = fragment.props.frontmatter;
@@ -29,5 +31,5 @@ export default function Fragments({ fragments }) {
children.push(
for each type that has the directive defined by the transformer
@@ -155,23 +157,23 @@ The table below shows the lifecycle methods that a transformer plugin can implem
for each inputValue that has the directive defined by the transformer
-
prepare
+
prepare
transformer register themselves in the `TransformerContext` (as data provider or data enhancer)
-
validate
+
validate
transformer validates the directive arguments
-
transformSchema
+
transformSchema
transformer updates/augments the output schema
-
generateResolvers
+
generateResolvers
transformer generates resources such as resolvers, IAM policies, Tables, etc.
-
after
+
after
cleanup, this lifecycle method is invoked in reverse order for the registered transformers
diff --git a/src/fragments/lib-v1/datastore/flutter/getting-started/50_codegenCli.mdx b/src/fragments/lib-v1/datastore/flutter/getting-started/50_codegenCli.mdx
index 178878738c4..5a59463031a 100644
--- a/src/fragments/lib-v1/datastore/flutter/getting-started/50_codegenCli.mdx
+++ b/src/fragments/lib-v1/datastore/flutter/getting-started/50_codegenCli.mdx
@@ -7,9 +7,3 @@ amplify codegen models
```
The generated files will be under the `lib/models` directory by default. They get re-generated each time codegen is run.
-
-
-
-Codegen generates models using Dart null safety by default for a new Flutter project. It also provides a configurable feature flag to generate null safe models for existing Flutter projects. Check [here](https://docs.amplify.aws/lib-v1/project-setup/null-safety/q/platform/flutter) for more details.
-
-
diff --git a/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx b/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx
index d95d06aaa34..2d5175e9b82 100644
--- a/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx
+++ b/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx
@@ -7,9 +7,3 @@ amplify codegen models
```
The generated files will be under the `lib/models` directory by default. They get re-generated each time codegen is run.
-
-
-
-Codegen generates models using Dart null safety by default for a new Flutter project. It also provides a configurable feature flag to generate null safe models for existing Flutter projects. Check [here](https://docs.amplify.aws/lib-v1/project-setup/null-safety/q/platform/flutter) for more details.
-
-
diff --git a/src/fragments/lib-v1/project-setup/flutter/null-safety/null-safety.mdx b/src/fragments/lib-v1/project-setup/flutter/null-safety/null-safety.mdx
deleted file mode 100644
index 9eb003b360e..00000000000
--- a/src/fragments/lib-v1/project-setup/flutter/null-safety/null-safety.mdx
+++ /dev/null
@@ -1,38 +0,0 @@
-**Amplify Flutter and Null Safety**
-
-
-
-Amplify Flutter is planning to drop the support of non-null safe models in the near future. Please [migrate to Dart null safety](https://dart.dev/null-safety/migration-guide).
-
-
-
-The Amplify Flutter library supports [Dart null safety](https://dart.dev/null-safety) starting with version 0.2.0.
-
-| | amplify-flutter 0.1.x | amplify-flutter 0.2.x |
-|------------------------------- |--------------------------------- |--------------------------------- |
-| Null Safe App | Not Supported | Supported |
-| Non Null Safe App w/ flutter v2 | Supported | Supported |
-| Non Null Safe App w/ flutter v1 | Supported | Not Supported |
-
-**DataStore with Code Generated Models and Null Safety**
-
-The latest version of the Amplify CLI can generate Dart models with or without null safety using the `amplify codegen models` command.
-
-***Opting-in to Null Safety***
-
-If you have a null safe app, or are migrating to null safety and your app uses generated models from amplify, you will need ensure the models are null safe as well. You should follow the [flutter null safety migration docs](https://dart.dev/null-safety/migration-guide) to migrate your application code, excluding the generated models.
-
-To migrate to null safe models, you can simply regenerate them following the instructions:
-1. Make sure that the `pubspec.yaml` file at the root of your projects defines a Dart SDK version of 2.12.0 or greater.
-2. Update your Amplify CLI to version 5.1.0 or higher.
-```js
-npm install -g @aws-amplify/cli
-```
-4. Make sure that the `enableDartNullSafety` [feature flag](https://docs.amplify.aws/cli/reference/feature-flags) is set to "true" in your `amplify/cli.json` file.
-5. Re-run `amplify codegen models` for your schema.
-
-***Opting-out of Null Safety***
-
-If you wish to continue using non-null safe models:
-1. Make sure that the `enableDartNullSafety` [feature flag](https://docs.amplify.aws/cli/reference/feature-flags) is set to "false".
-2. Re-run `amplify codegen models` for your schema
diff --git a/src/fragments/lib-v1/project-setup/native_common/prereq/flutter_null_safety.mdx b/src/fragments/lib-v1/project-setup/native_common/prereq/flutter_null_safety.mdx
deleted file mode 100644
index 97eab702189..00000000000
--- a/src/fragments/lib-v1/project-setup/native_common/prereq/flutter_null_safety.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-Amplify Flutter now supports Dart null safety. See the [null safety documentation](/lib-v1/project-setup/null-safety) for details.
-
-
diff --git a/src/fragments/lib/auth/android/getting_started/50_configureBackend.mdx b/src/fragments/lib/auth/android/getting_started/50_configureBackend.mdx
index 4900c63bd11..73b3ac5f1b7 100644
--- a/src/fragments/lib/auth/android/getting_started/50_configureBackend.mdx
+++ b/src/fragments/lib/auth/android/getting_started/50_configureBackend.mdx
@@ -122,6 +122,22 @@ If you are not using the Amplify CLI, existing Authentication resources from AWS
"Auth": {
"Default": {
"authenticationFlowType": "USER_SRP_AUTH",
+ "socialProviders": [],
+ "usernameAttributes": [],
+ "signupAttributes": [
+ "[SIGNUP MECHANISM]"
+ ],
+ "passwordProtectionSettings": {
+ "passwordPolicyMinLength": [PASSWORD LENGTH],
+ "passwordPolicyCharacters": []
+ },
+ "mfaConfiguration": "OFF",
+ "mfaTypes": [
+ "[MFA TYPE]"
+ ],
+ "verificationMechanisms": [
+ "[VERIFICATION MECHANISM]"
+ ],
"OAuth": {
"WebDomain": "[YOUR COGNITO DOMAIN ]",
"AppClientId": "[COGNITO USER POOL APP CLIENT ID]",
@@ -163,4 +179,4 @@ If you are using a Cognito User Pool without a Cognito Identity Pool, you can om
-
\ No newline at end of file
+
diff --git a/src/fragments/lib/auth/ios/getting_started/50_configureBackend.mdx b/src/fragments/lib/auth/ios/getting_started/50_configureBackend.mdx
index 16082774f3e..f4b47c5814a 100644
--- a/src/fragments/lib/auth/ios/getting_started/50_configureBackend.mdx
+++ b/src/fragments/lib/auth/ios/getting_started/50_configureBackend.mdx
@@ -132,6 +132,22 @@ If you are not using the Amplify CLI, existing Authentication resources from AWS
"Auth": {
"Default": {
"authenticationFlowType": "USER_SRP_AUTH",
+ "socialProviders": [],
+ "usernameAttributes": [],
+ "signupAttributes": [
+ "[SIGNUP MECHANISM]"
+ ],
+ "passwordProtectionSettings": {
+ "passwordPolicyMinLength": [PASSWORD LENGTH],
+ "passwordPolicyCharacters": []
+ },
+ "mfaConfiguration": "OFF",
+ "mfaTypes": [
+ "[MFA TYPE]"
+ ],
+ "verificationMechanisms": [
+ "[VERIFICATION MECHANISM]"
+ ],
"OAuth": {
"WebDomain": "[YOUR COGNITO DOMAIN ]",
"AppClientId": "[COGNITO USER POOL APP CLIENT ID]",
@@ -174,4 +190,4 @@ If you are using a Cognito User Pool without a Cognito Identity Pool, you can om
-
\ No newline at end of file
+
diff --git a/src/fragments/lib/project-setup/flutter/upgrade-guide/upgrade-guide.mdx b/src/fragments/lib/project-setup/flutter/upgrade-guide/upgrade-guide.mdx
index 7439d744a5d..fb6cbe1ca6d 100644
--- a/src/fragments/lib/project-setup/flutter/upgrade-guide/upgrade-guide.mdx
+++ b/src/fragments/lib/project-setup/flutter/upgrade-guide/upgrade-guide.mdx
@@ -291,7 +291,7 @@ Follow the instructions [here](/lib/auth/social/q/platform/flutter/#platform-set
- Automatic session reporting behavior has been aligned in v1. For all platforms, backgrounding and foregrounding the app will stop and start a new session. Previously on iOS, the session would pause and then resume.
- You can now save to the `UserAttributes` field of a Pinpoint Endpoint by passing an `AWSPinpointUserProfile` to `identifyUser`.
- Analytics cached event data is now stored differently. Existing cached analytics events will not be migrated.
-- There are now typed `AnalyticsException`s for specific exception cases. See [the documentation on Pub](https://pub.dev/documentation/amplify_analytics_pinpoint/latest/amplify_analytics_pinpoint/amplify_analytics_pinpoint-library.html) for a full list of exceptions.
+- There are now typed `AnalyticsException`s for specific exception cases.
## API
diff --git a/src/fragments/lib/project-setup/native_common/prereq/flutter_null_safety.mdx b/src/fragments/lib/project-setup/native_common/prereq/flutter_null_safety.mdx
deleted file mode 100644
index 4acf8b59450..00000000000
--- a/src/fragments/lib/project-setup/native_common/prereq/flutter_null_safety.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-Amplify Flutter now supports Dart null safety. See the [null safety documentation](/lib/project-setup/null-safety) for details.
-
-
diff --git a/src/fragments/sdk/api/android/graphql.mdx b/src/fragments/sdk/api/android/graphql.mdx
index 4c84a92fbb3..7f74fe28927 100644
--- a/src/fragments/sdk/api/android/graphql.mdx
+++ b/src/fragments/sdk/api/android/graphql.mdx
@@ -94,7 +94,7 @@ buildscript {
}
dependencies {
- classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.2.1'
+ classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.4.0'
// ...
}
// ...
@@ -111,7 +111,7 @@ allprojects {
}
```
-Next, in the **build.gradle (Module :app)** file, add in a plugin of `apply plugin: 'com.amazonaws.appsync'` and a dependency of `implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.1'`. For example:
+Next, in the **build.gradle (Module :app)** file, add in a plugin of `apply plugin: 'com.amazonaws.appsync'` and a dependency of `implementation 'com.amazonaws:aws-android-sdk-appsync:3.4.0'`. For example:
```groovy
plugins {
@@ -123,7 +123,7 @@ android {
}
dependencies {
// REQUIRED: Typical dependencies
- implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.1'
+ implementation 'com.amazonaws:aws-android-sdk-appsync:3.4.0'
}
```
diff --git a/src/fragments/start/getting-started/reactnative/nextsteps.mdx b/src/fragments/start/getting-started/reactnative/nextsteps.mdx
index 6cae9a2a818..ddc6e18b42e 100644
--- a/src/fragments/start/getting-started/reactnative/nextsteps.mdx
+++ b/src/fragments/start/getting-started/reactnative/nextsteps.mdx
@@ -7,4 +7,3 @@
- [In-App Messaging](/lib/in-app-messaging/overview)
- [Push Notifications](/lib/push-notifications/getting-started)
- [PubSub](/lib/pubsub/getting-started)
-- [AR/VR](/lib/xr/getting-started)
diff --git a/src/fragments/start/getting-started/vue/nextsteps.mdx b/src/fragments/start/getting-started/vue/nextsteps.mdx
index a26fdfb2c68..ec1d6575b36 100644
--- a/src/fragments/start/getting-started/vue/nextsteps.mdx
+++ b/src/fragments/start/getting-started/vue/nextsteps.mdx
@@ -4,5 +4,4 @@
- [Serverless APIs](/lib/graphqlapi/getting-started)
- [Analytics](/lib/analytics/getting-started)
- [AI/ML](/lib/predictions/getting-started)
-- [PubSub](/lib/pubsub/getting-started)
-- [AR/VR](/lib/xr/getting-started)
\ No newline at end of file
+- [PubSub](/lib/pubsub/getting-started)
\ No newline at end of file
diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx
index d7ceef81fae..c56883efb45 100644
--- a/src/pages/_document.tsx
+++ b/src/pages/_document.tsx
@@ -41,7 +41,8 @@ const ANALYTICS_CSP = {
'https://aa0.awsstatic.com/',
'https://alpha.d2c.marketing.aws.dev/',
'https://aws-mktg-csds-alpha.integ.amazon.com/',
- 'https://d2c-alpha.dse.marketing.aws.a2z.com'
+ 'https://d2c-alpha.dse.marketing.aws.a2z.com',
+ 'https://vs-alpha.aws.amazon.com'
],
img: ['https://aa0.awsstatic.com/', 'https://alpha.d2c.marketing.aws.dev/'],
script: [
@@ -61,7 +62,6 @@ const getCspContent = (context) => {
if (process.env.BUILD_ENV !== 'production') {
return `upgrade-insecure-requests;
default-src 'none';
- prefetch-src 'self';
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
font-src 'self' data:;
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
@@ -85,7 +85,6 @@ const getCspContent = (context) => {
// Have to keep track of CSP inside customHttp.yml as well
return `upgrade-insecure-requests;
default-src 'none';
- prefetch-src 'self';
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
font-src 'self';
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
diff --git a/src/pages/cli/graphql/authorization-rules.mdx b/src/pages/cli/graphql/authorization-rules.mdx
index f2fb27f1f4f..bfcc6160cc5 100644
--- a/src/pages/cli/graphql/authorization-rules.mdx
+++ b/src/pages/cli/graphql/authorization-rules.mdx
@@ -43,11 +43,7 @@ input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }
-```graphql
-input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }
-```
-
-In your CDK construct, you'll need to enable this "sandbox mode" via an input parameter, rather than as part of the Graphql schema definition:
+In the CDK construct, we call this the "sandbox mode" that you need to explicitly enable via an input parameter.
```ts
new AmplifyGraphqlApi(this, "MyNewApi", {
@@ -108,7 +104,18 @@ When you run `amplify add auth`, the Amplify CLI generates scoped down IAM poli
Designate an IAM role for unauthenticated identities by setting the `iamConfig` property:
```ts
-const amplifyApi = new AmplifyGraphqlApi(this, "MyNewApi", {
+// Note: this sample uses the alpha Cognito Identity Pool construct, but is not required, CfnIdentityPool can be used as well
+import cognito_identitypool from '@aws-cdk/aws-cognito-identitypool-alpha';
+
+const identityPool = new cognito_identitypool.IdentityPool(stack, 'MyNewIdentityPool', {
+ allowUnauthenticatedIdentities: true,
+ authenticationProviders: { userPools: [new cognito_identitypool.UserPoolAuthenticationProvider({
+ userPool: ,
+ userPoolClient: ,
+ })] },
+});
+
+new AmplifyGraphqlApi(this, "MyNewApi", {
definition: AmplifyGraphqlDefinition.fromFiles(path.join(__dirname, "schema.graphql")),
authorizationModes: {
defaultAuthorizationMode: 'API_KEY',
@@ -116,20 +123,14 @@ const amplifyApi = new AmplifyGraphqlApi(this, "MyNewApi", {
expires: cdk.Duration.days(30)
},
iamConfig: {
- identityPoolId: ":", // <-- pass in your identity pool ID
- unauthenticatedUserRole: ..., // <-- pass in your unauthenticatedUserRole here
- authenticatedUserRole: ... // <-- pass in your authenticatedUserRole here
+ identityPoolId: identityPool.identityPoolId,
+ authenticatedUserRole: identityPool.authenticatedRole,
+ unauthenticatedUserRole: identityPool.unauthenticatedRole,
}
},
})
```
-
-
-**Note:** You must pass the identity pool ID as a string in the format above. Using a reference through a CDK token is currently not supported.
-
-
-
@@ -230,7 +231,18 @@ When you run `amplify add auth`, the Amplify CLI generates scoped down IAM poli
Designate an IAM role for authenticated identities by setting the `iamConfig` property:
```ts
-const amplifyApi = new AmplifyGraphqlApi(this, "MyNewApi", {
+// Note: this sample uses the alpha Cognito Identity Pool construct, but is not required, CfnIdentityPool can be used as well
+import cognito_identitypool from '@aws-cdk/aws-cognito-identitypool-alpha';
+
+const identityPool = new cognito_identitypool.IdentityPool(stack, 'MyNewIdentityPool', {
+ allowUnauthenticatedIdentities: true,
+ authenticationProviders: { userPools: [new cognito_identitypool.UserPoolAuthenticationProvider({
+ userPool: ,
+ userPoolClient: ,
+ })] },
+});
+
+new AmplifyGraphqlApi(this, "MyNewApi", {
definition: AmplifyGraphqlDefinition.fromFiles(path.join(__dirname, "schema.graphql")),
authorizationModes: {
defaultAuthorizationMode: 'API_KEY',
@@ -238,20 +250,14 @@ const amplifyApi = new AmplifyGraphqlApi(this, "MyNewApi", {
expires: cdk.Duration.days(30)
},
iamConfig: {
- identityPoolId: ":", // <-- pass in your identity pool ID
- unauthenticatedUserRole: ..., // <-- pass in your unauthenticatedUserRole here
- authenticatedUserRole: ... // <-- pass in your authenticatedUserRole here
+ identityPoolId: identityPool.identityPoolId,
+ authenticatedUserRole: identityPool.authenticatedRole,
+ unauthenticatedUserRole: identityPool.unauthenticatedRole,
}
},
})
```
-
-
-**Note:** You must pass the identity pool ID as a string in the format above. Using a reference through a CDK token is currently not supported.
-
-
-
diff --git a/src/pages/cli/graphql/data-modeling.mdx b/src/pages/cli/graphql/data-modeling.mdx
index 56c2a42a945..a34e8971da7 100644
--- a/src/pages/cli/graphql/data-modeling.mdx
+++ b/src/pages/cli/graphql/data-modeling.mdx
@@ -434,12 +434,14 @@ const postComments = postWithComments.comments.items; // access comments from po
### Belongs To relationship
-Make a "has one" or "has many" relationship bi-directional with the `@belongsTo` directive.
+Make a "has one" or "has many" relationship bi-directional with the `@belongsTo` directive.
+For 1:1 relationships, the @belongsTo directive solely facilitates the ability for you to query from both sides of the relationship. When updating a bi-directional hasOne relationship, you must update both sides of the relationship with corresponding IDs.
+
```graphql
type Project @model {
id: ID!
diff --git a/src/pages/cli/graphql/overview.mdx b/src/pages/cli/graphql/overview.mdx
index 5523331294a..144d38d27a6 100644
--- a/src/pages/cli/graphql/overview.mdx
+++ b/src/pages/cli/graphql/overview.mdx
@@ -38,6 +38,23 @@ Edit the file in your editor: <...>/schema.graphql
Accept the default values and your code editor should show a GraphQL schema for a Todo app with the following code:
+```graphql
+# This "input" configures a global authorization rule to enable public access to
+# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/auth
+input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY!
+
+type Todo @model {
+ id: ID!
+ name: String!
+ description: String
+}
+```
+
+
+
+`input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }` allows you to get started quickly without worrying about authorization rules. Review the [Authorization rules](/cli/graphql/authorization-rules) section to setup the appropriate access control for your GraphQL API.
+
+
@@ -67,9 +84,9 @@ export class BackendStack extends cdk.Stack {
super(scope, id, props);
const amplifyApi = new AmplifyGraphqlApi(this, 'AmplifyCdkGraphQlApi', {
- schema: AmplifyGraphqlSchema.fromFiles(path.join(__dirname, "schema.graphql")),
- authorizationConfig: {
- defaultAuthMode: 'API_KEY',
+ definition: AmplifyGraphqlDefinition.fromFiles(path.join(__dirname, "schema.graphql")),
+ authorizationModes: {
+ defaultAuthorizationMode: 'API_KEY',
apiKeyConfig: {
expires: cdk.Duration.days(30)
}
@@ -81,27 +98,20 @@ export class BackendStack extends cdk.Stack {
Then create your GraphQL schema where you describe your data model. Create a new file called `schema.graphql` in your stack's folder with the following code:
-
-
-
```graphql
-# This "input" configures a global authorization rule to enable public access to
-# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/auth
-input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY!
-
-type Todo @model {
+type Todo @model @auth(rules: [{ allow: public }]) {
id: ID!
name: String!
description: String
}
```
-Every GraphQL `type` with the `@model` directive is automatically backed by a new DynamoDB database table and generates create, read, update, and delete GraphQL queries and mutations for you.
+`@auth(rules: [{ allow: public }]` designates that anyone authenticated with an API key can create, read, update, and delete "Todo" records.
-
+
+
-`input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }` allows you to get started quickly without worrying about authorization rules. Review the [Authorization rules](/cli/graphql/authorization-rules) section to setup the appropriate access control for your GraphQL API.
-
+Every GraphQL `type` with the `@model` directive is automatically backed by a new DynamoDB database table and generates create, read, update, and delete GraphQL queries and mutations for you.
Now let's deploy your changes to the cloud:
diff --git a/src/pages/cli/q/integration/[integration].mdx b/src/pages/cli/q/integration/[integration].mdx
deleted file mode 100644
index f3f8d57f77d..00000000000
--- a/src/pages/cli/q/integration/[integration].mdx
+++ /dev/null
@@ -1,96 +0,0 @@
-export const meta = {
- title: "Typical workflows",
- description:
- "How to initialize a new Amplify project and other typical Amplify CLI workflows & commands.",
-};
-
-## Initialize new project
-
-To initialize a new Amplify project, run the following command from the root directory of your frontend app.
-
-```bash
-amplify init
-```
-
-The `init` command goes through the following steps:
-
-- Analyzes the project and confirms the frontend settings
-- Carries out the initialization logic of the selected frontend
-- If there are multiple provider plugins, prompts to select the plugins that will provide accesses to cloud resources
-- Carries out, in sequence, the initialization logic of the selected plugin(s)
-- Insert amplify folder structure into the project's root directory, with the initial project configuration
-- Generate the project metadata files, with the outputs of the above-selected plugin(s)
-- Creates a cloud project in the [AWS Amplify Console](https://console.aws.amazon.com/amplify) to view and manage resources for all backend environments.
-
-## Clone sample Amplify project
-
-To clone a sample amplify fullstack project, execute the following command inside an empty directory:
-
-`amplify init --app `
-
-where `` is a valid sample Amplify project repository. Click [here](/cli/usage/headless#--app) for more details.
-
-## Common CLI commands
-
-### amplify init
-
-The `init` command can determine defaults for the project based on the contents of the directory. To accept the defaults offered, answer yes to:
-
-`Initialize the project with the above configuration?`
-
-During the init process, the root stack is created with three resources:
-
-- IAM role for unauthenticated users
-- IAM role for authenticated users
-- S3 bucket, the deployment bucket, to support this provider's workflow
-
-The provider logs the information of the root stack and the resources into the project metadata file (amplify/backend/amplify-meta.json).
-
-### amplify add
-
-Once init is complete, run the command `amplify add` to add resources of a category to the cloud. This will place a CloudFormation template for the resources of this category in the category's subdirectory `amplify/backend/` and insert its reference into the above-mentioned root stack as the nested child stack. When working in teams, it is good practice to run an `amplify pull` before modifying the backend categories.
-
-### amplify push
-
-Once you have made your category updates, run the command `amplify push` to update the cloud resources. The CLI will first upload the latest versions of the category nested stack templates to the S3 deployment bucket, and then call the AWS CloudFormation API to create / update resources in the cloud. Based upon the resources added/updated, the `aws-exports.js` file (for JS projects) and the `awsconfiguration.json` file (for native projects) gets created/updated. The root stack's template can be found in `amplify/backend/awscloudformation`.
-
-### amplify pull
-
-The `amplify pull` command operates similar to a _git pull_, fetching upstream backend environment definition changes from the cloud and updating the local environment to match that definition. The command is particularly helpful in team scenarios when multiple team members are editing the same backend, pulling a backend into a new project, or when connecting to [multiple frontend projects](/cli/teams/multi-frontend) that share the same Amplify backend environment.
-
-### amplify console
-
-The `amplify console` command launches the browser directing you to your cloud project in the AWS Amplify Console. The Amplify Console provides a central location for development teams to view and manage their backend environments, status of the backend deployment, deep-links to the backend resources by Amplify category, and instructions on how to pull, clone, update, or delete environments.
-
-### amplify configure project
-
-The `amplify configure project` command is an advanced command and not commonly used for initial getting started projects. The command should be used to modify the project configuration present in the `.config/` directory and re-configuring AWS credentials (based on profile on your local machine) set up during the `amplify init` step. The `.config/` directory is generated in the `amplify/` directory, if not already present, and the `local-aws-info.json`, `local-env-info.json` and `project-info.json` files are configured to reflect the selections made as a part of the `amplify configure project` command.
-
-`amplify configure project` is also used to enable **Serverless Container** options in your project with Amazon Elastic Container Service. When enabled, you will be able to build APIs with both AWS Lambda and AWS Fargate using a [Dockerfile](https://docs.docker.com/engine/reference/builder/) or a [Docker Compose file](https://docs.docker.com/compose/compose-file/). See [Serverless Containers](/cli/usage/containers) for more information.
-
-### amplify logout --appId
-
-When Amplify CLI is authenticated with Amplify Studio, JSON Web Tokens (JWTs) are stored on the developer's machine. This command will remove the JWTs associated with a particular Amplify project. The CLI will also prompt if you want to logout from all sessions. 'Yes' will remove the JWTs and ensure they are invalidated globally. 'No' will still remove the locally-stored JWTs but the tokens will remain valid until they expire.
-
-## List of commands
-
-- `amplify `
-- `amplify push`
-- `amplify pull`
-- `amplify env `
-- `amplify configure`
-- `amplify console`
-- `amplify delete`
-- `amplify help`
-- `amplify init`
-- `amplify publish`
-- `amplify run`
-- `amplify status`
-- `amplify logout`
-
-### Category commands
-
-- `amplify add`
-- `amplify update`
-- `amplify remove`
-- `amplify push`
diff --git a/src/pages/cli/usage/containers.mdx b/src/pages/cli/usage/containers.mdx
index 4ec3892e220..807784f8d04 100644
--- a/src/pages/cli/usage/containers.mdx
+++ b/src/pages/cli/usage/containers.mdx
@@ -5,7 +5,7 @@ export const meta = {
Serverless containers provide the ability for you to deploy APIs and host websites using AWS Fargate. Customers with existing applications or those who require a lower level of control can bring Docker containers and deploy them into an Amplify project fully integrating with other resources.
-Amplify [libraries](/lib) can be used with the [Auth category](/lib/auth/start) giving mobile and web applications secure connectivity and access controls to your Serverless containers. Additionally, existing GraphQL and REST services such as AWS AppSync and Amazon API Gateway can be used in the same project along with Fargate-backed APIs giving flexibility to mix and match for cost optimization and operational needs.
+Amplify [libraries](/lib) can be used with the [Auth category](/lib/auth/getting-started) giving mobile and web applications secure connectivity and access controls to your Serverless containers. Additionally, existing GraphQL and REST services such as AWS AppSync and Amazon API Gateway can be used in the same project along with Fargate-backed APIs giving flexibility to mix and match for cost optimization and operational needs.
Note that serverless containers do incur additional costs and operational overhead, as such we recommend using AWS AppSync with the [GraphQL Transform](/cli/graphql/overview) as a starting point when building mobile and web apps with Amplify.
diff --git a/src/pages/console/authz/permissions.mdx b/src/pages/console/authz/permissions.mdx
index b8009f20c80..a5b65089786 100644
--- a/src/pages/console/authz/permissions.mdx
+++ b/src/pages/console/authz/permissions.mdx
@@ -16,14 +16,14 @@ You are going to define set up role-based authorization rules for each of the mo
2. In the **Model** pane on the right, expand the **Owners** window.
3. Choose **Create**, **Read**, **Update** and **Delete** to specify that *Owners* have create, read, update, and delete access. The settings look as follows.
-![](/images/console/10_ownersaccess.png)
+![Owners Access Console View](/images/console/10_ownersaccess.png)
## To set a private authorization rule
1. Using the *Books* data model that you created in the [Create a data model example](/console/data/data-model#Create-a-data-model-example), set the authorization mode to **Cognito user pool**.
2. In the **Model** pane on the right, expand the **Any signed-in users** window.
3. Choose **Create**, **Read**, and **Update** to specify that any signed-in authenticated user has create, read, and update, access.
-![](/images/console/11_privatesaccess.png)
+![Private Access Console View](/images/console/11_privatesaccess.png)
## To set a group authorization rule
@@ -35,7 +35,7 @@ You are going to define set up role-based authorization rules for each of the mo
4. Choose **Create**, **Read**, **Update** and **Delete** to specify that signed in users in the *Editors* group have create, read, update, and delete access.
-![](/images/console/9_editorgroupaccess.png)
+![Editor Access Console View](/images/console/9_editorgroupaccess.png)
## To set a public authorization rule
@@ -44,4 +44,4 @@ If you want your data model to be publicly accessible, switch to API_KEY or IAM
1. Using the *Books* data model that you created in the [Create a data model example](/console/data/data-model#Create-a-data-model-example), set the authorization mode to **API Key**.
2. In the **Model** pane on the right, expand the **Anyone** window. Choose **Read** to specify that any signed in user has read access to the data in the *Book* model.
-![](/images/console/7_publicauthreadonly.png)
+![Public Auth Readonly Access Console View](/images/console/7_publicauthreadonly.png)
diff --git a/src/pages/contribute/getting-started.tsx b/src/pages/contribute/getting-started.tsx
index 01eb25134ac..4ddbc5ae8ff 100644
--- a/src/pages/contribute/getting-started.tsx
+++ b/src/pages/contribute/getting-started.tsx
@@ -56,6 +56,7 @@ const Code = ({ children, color }) => {
{children}
diff --git a/src/pages/guides/api-graphql/building-a-form-api/index.mdx b/src/pages/guides/api-graphql/building-a-form-api/index.mdx
new file mode 100644
index 00000000000..7294d55d6d3
--- /dev/null
+++ b/src/pages/guides/api-graphql/building-a-form-api/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/building-a-form-api/q/platform/[platform].mdx b/src/pages/guides/api-graphql/building-a-form-api/q/platform/[platform].mdx
index cd673c82d4d..83a764dd2f1 100644
--- a/src/pages/guides/api-graphql/building-a-form-api/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/building-a-form-api/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Building a Form API with GraphQL`,
description: `How to implement pagination with GraphQL`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to build and interact with a Form API using Amplify.
diff --git a/src/pages/guides/api-graphql/graphql-pagination/index.mdx b/src/pages/guides/api-graphql/graphql-pagination/index.mdx
new file mode 100644
index 00000000000..00acff39913
--- /dev/null
+++ b/src/pages/guides/api-graphql/graphql-pagination/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/graphql-pagination/q/platform/[platform].mdx b/src/pages/guides/api-graphql/graphql-pagination/q/platform/[platform].mdx
index 58e85d9efab..74ddc28ed1f 100644
--- a/src/pages/guides/api-graphql/graphql-pagination/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/graphql-pagination/q/platform/[platform].mdx
@@ -1,17 +1,36 @@
export const meta = {
title: `GraphQL pagination`,
description: `How to implement pagination with GraphQL `,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to implement pagination in your GraphQL API.
-When working with a large record set, you may want to only fetch the first __N__ number of items. For example, let's start with a basic GraphQL schema for a Todo app:
+When working with a large record set, you may want to only fetch the first **N** number of items. For example, let's start with a basic GraphQL schema for a Todo app:
```graphql
type Todo @model {
id: ID!
title: String!
- description: String
+ description: String
}
```
@@ -20,7 +39,11 @@ When the API is created with an `@model` directive, the following queries will a
```graphql
type Query {
getTodo(id: ID!): Todo
- listTodos(filter: ModelTodoFilterInput, limit: Int, nextToken: String): ModelTodoConnection
+ listTodos(
+ filter: ModelTodoFilterInput
+ limit: Int
+ nextToken: String
+ ): ModelTodoConnection
}
```
@@ -67,7 +90,7 @@ query listTodos {
}
```
- Now, to query the next 2 items from the API, you can pass this `nextToken` as the argument:
+Now, to query the next 2 items from the API, you can pass this `nextToken` as the argument:
```graphql
query listTodos {
@@ -84,6 +107,6 @@ query listTodos {
When there are no other items left to be returned, the `nextToken` in the response will be set to null.
-import js0 from "/src/fragments/guides/api-graphql/js/graphql-pagination.mdx";
+import js0 from '/src/fragments/guides/api-graphql/js/graphql-pagination.mdx';
-
\ No newline at end of file
+
diff --git a/src/pages/guides/api-graphql/image-and-file-uploads/index.mdx b/src/pages/guides/api-graphql/image-and-file-uploads/index.mdx
new file mode 100644
index 00000000000..6c4b3e83ea7
--- /dev/null
+++ b/src/pages/guides/api-graphql/image-and-file-uploads/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/image-and-file-uploads/q/platform/[platform].mdx b/src/pages/guides/api-graphql/image-and-file-uploads/q/platform/[platform].mdx
index a4e0c4d42c4..c29aef81603 100644
--- a/src/pages/guides/api-graphql/image-and-file-uploads/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/image-and-file-uploads/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `How to Manage Image & File Uploads & Downloads`,
description: `How to manage image and file uploads and downloads with GraphQL and AWS Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/api-graphql/js/image-and-file-uploads.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/api-graphql/js/image-and-file-uploads.mdx';
+
+
diff --git a/src/pages/guides/api-graphql/lambda-resolvers/index.mdx b/src/pages/guides/api-graphql/lambda-resolvers/index.mdx
new file mode 100644
index 00000000000..c7b85f7c828
--- /dev/null
+++ b/src/pages/guides/api-graphql/lambda-resolvers/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/lambda-resolvers/q/platform/[platform].mdx b/src/pages/guides/api-graphql/lambda-resolvers/q/platform/[platform].mdx
index d058f3b9836..1cb95315f39 100644
--- a/src/pages/guides/api-graphql/lambda-resolvers/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/lambda-resolvers/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `How to use Lambda GraphQL Resolvers`,
description: `How to use Lambda GraphQL resolvers to interact with other services`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
The [GraphQL Transform Library](/cli/graphql/custom-business-logic#lambda-function-resolver) provides a `@function` directive that enables the configuration of AWS Lambda function resolvers within your GraphQL API. In this guide you will learn how to use Lambda functions as GraphQL resolvers to interact with other services and APIs using the `@function` directive.
@@ -41,12 +60,12 @@ amplify add function
? Do you want to edit the local lambda function now? Yes
```
-Open the function code (located at __amplify/backend/function/echofunction/src/index.js__) and press enter:
+Open the function code (located at **amplify/backend/function/echofunction/src/index.js**) and press enter:
```js
exports.handler = async (event) => {
- const response = event.arguments.msg
- return response;
+ const response = event.arguments.msg;
+ return response;
};
```
@@ -86,13 +105,13 @@ amplify add function
? Do you want to edit the local lambda function now? Yes
```
-Next, update the function code (located at __amplify/backend/function/addingfunction/src/index.js__) to the following and press enter:
+Next, update the function code (located at **amplify/backend/function/addingfunction/src/index.js**) to the following and press enter:
```js
exports.handler = async (event) => {
- /* Add number1 and number2, return the result */
- const response = event.arguments.number1 + event.arguments.number2
- return response;
+ /* Add number1 and number2, return the result */
+ const response = event.arguments.number1 + event.arguments.number2;
+ return response;
};
```
@@ -129,7 +148,7 @@ amplify add api
> Y
```
-Next, update the base GraphQL schema (located at __amplify/backend/api/gqllambda/schema.graphql__) with the following code and press enter:
+Next, update the base GraphQL schema (located at **amplify/backend/api/gqllambda/schema.graphql**) with the following code and press enter:
```graphql
type Query {
@@ -157,7 +176,7 @@ query echo {
}
mutation add {
- add(number1: 1100, number2:100)
+ add(number1: 1100, number2: 100)
}
```
@@ -171,23 +190,23 @@ Create another function:
amplify add function
```
-Next, update the function code (located at __amplify/backend/function/cryptofunction/src/index.js__) to the following and press enter:
+Next, update the function code (located at **amplify/backend/function/cryptofunction/src/index.js**) to the following and press enter:
```javascript
-const axios = require('axios')
+const axios = require('axios');
exports.handler = async (event) => {
- let limit = 10
- if (event.arguments.limit) {
- limit = event.arguments.limit
- }
- const url = `https://api.coinlore.net/api/tickers/?limit=${limit}`
- let response = await axios.get(url)
- return JSON.stringify(response.data.data);
+ let limit = 10;
+ if (event.arguments.limit) {
+ limit = event.arguments.limit;
+ }
+ const url = `https://api.coinlore.net/api/tickers/?limit=${limit}`;
+ let response = await axios.get(url);
+ return JSON.stringify(response.data.data);
};
```
-Next, install the axios library in the function __src__ folder and change back into the root directory:
+Next, install the axios library in the function **src** folder and change back into the root directory:
```sh
cd amplify/backend/function/cryptofunction/src
diff --git a/src/pages/guides/api-graphql/query-with-sorting/index.mdx b/src/pages/guides/api-graphql/query-with-sorting/index.mdx
new file mode 100644
index 00000000000..2025f7ea409
--- /dev/null
+++ b/src/pages/guides/api-graphql/query-with-sorting/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/query-with-sorting/q/platform/[platform].mdx b/src/pages/guides/api-graphql/query-with-sorting/q/platform/[platform].mdx
index 95dff00c684..3a63a519dba 100644
--- a/src/pages/guides/api-graphql/query-with-sorting/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/query-with-sorting/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `GraphQL query with sorting by date`,
description: `How to implement sorting in a GraphQL query`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to implement sorting in a GraphQL API. In our example, you will implement sorting results by date in either an ascending or descending order by implementing an additional data access pattern leveraging a DynamoDB Global Secondary Index using the `@index` GraphQL Transformer directive.
diff --git a/src/pages/guides/api-graphql/subscriptions-by-id/index.mdx b/src/pages/guides/api-graphql/subscriptions-by-id/index.mdx
new file mode 100644
index 00000000000..9ffdd05296e
--- /dev/null
+++ b/src/pages/guides/api-graphql/subscriptions-by-id/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-graphql/subscriptions-by-id/q/platform/[platform].mdx b/src/pages/guides/api-graphql/subscriptions-by-id/q/platform/[platform].mdx
index 4e650917cf3..4202f1c22a9 100644
--- a/src/pages/guides/api-graphql/subscriptions-by-id/q/platform/[platform].mdx
+++ b/src/pages/guides/api-graphql/subscriptions-by-id/q/platform/[platform].mdx
@@ -1,24 +1,43 @@
export const meta = {
title: `How to create GraphQL subscriptions by id`,
description: `How to create a custom GraphQL subscription that will listen by id`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to create a custom GraphQL subscription that will only by connected and triggered by a mutation containing a specific ID as an argument.
When using the Amplify GraphQL transform library, there will often be times when you need to expand the GraphQL schema and operations created by the `@model` directive. A common use case is when fine grained control is needed for GraphQL subscriptions.
-import ios0 from "/src/fragments/guides/api-graphql/ios/subscriptions-by-id.mdx";
+import ios0 from '/src/fragments/guides/api-graphql/ios/subscriptions-by-id.mdx';
-
+
-import js1 from "/src/fragments/guides/api-graphql/js/subscriptions-by-id.mdx";
+import js1 from '/src/fragments/guides/api-graphql/js/subscriptions-by-id.mdx';
-
+
-import android2 from "/src/fragments/guides/api-graphql/android/subscriptions-by-id.mdx";
+import android2 from '/src/fragments/guides/api-graphql/android/subscriptions-by-id.mdx';
-
+
-import flutter3 from "/src/fragments/guides/api-graphql/flutter/subscriptions-by-id.mdx";
+import flutter3 from '/src/fragments/guides/api-graphql/flutter/subscriptions-by-id.mdx';
-
+
diff --git a/src/pages/guides/api-rest/express-server/index.mdx b/src/pages/guides/api-rest/express-server/index.mdx
new file mode 100644
index 00000000000..42881cbe87c
--- /dev/null
+++ b/src/pages/guides/api-rest/express-server/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-rest/express-server/q/platform/[platform].mdx b/src/pages/guides/api-rest/express-server/q/platform/[platform].mdx
index 1ac2d8859de..d0fcf34d1aa 100644
--- a/src/pages/guides/api-rest/express-server/q/platform/[platform].mdx
+++ b/src/pages/guides/api-rest/express-server/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Express server`,
description: `How to deploy an Express server to AWS using AWS Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you'll learn how to deploy an [Express](https://expressjs.com/) web server complete with routing.
@@ -47,9 +66,9 @@ The CLI has created a few things for you:
### Updating the function code
-Let's open the code for the server.
+Let's open the code for the server.
-Open __amplify/backend/function/mylambda/src/index.js__.
+Open **amplify/backend/function/mylambda/src/index.js**.
In this file you will see the main function handler with the `event` and `context` being proxied to an express server located at `./app.js` (do not make any changes to this file):
@@ -63,19 +82,18 @@ exports.handler = (event, context) => {
console.log(`EVENT: ${JSON.stringify(event)}`);
awsServerlessExpress.proxy(server, event, context);
};
-
```
-Next, open __amplify/backend/function/mylambda/src/app.js__.
+Next, open **amplify/backend/function/mylambda/src/app.js**.
-Here, you will see the code for the express server and some boilerplate for the different HTTP methods for the route you declared.
+Here, you will see the code for the express server and some boilerplate for the different HTTP methods for the route you declared.
Find the route for `app.get('/items')` and update it to the following:
```js
// amplify/backend/function/mylambda/src/app.js
app.get('/items', function(req, res) {
- const items = ['hello', 'world']
+ const items = ['hello', 'world'];
res.json({ success: 'get call succeed!', items });
});
```
@@ -88,17 +106,17 @@ To deploy the API and function, you can run the `push` command:
amplify push
```
-import js0 from "/src/fragments/guides/api-rest/js/express-api-call.mdx";
+import js0 from '/src/fragments/guides/api-rest/js/express-api-call.mdx';
-
+
-import ios1 from "/src/fragments/guides/api-rest/ios/express-api-call.mdx";
+import ios1 from '/src/fragments/guides/api-rest/ios/express-api-call.mdx';
-
+
-import android2 from "/src/fragments/guides/api-rest/android/express-api-call.mdx";
+import android2 from '/src/fragments/guides/api-rest/android/express-api-call.mdx';
-
+
From here, you may want to add additional path. To do so, run the update command:
diff --git a/src/pages/guides/api-rest/form-api-with-dynamodb-and-lambda/q/platform/[platform].mdx b/src/pages/guides/api-rest/form-api-with-dynamodb-and-lambda/q/platform/[platform].mdx
deleted file mode 100644
index c632e43f7d0..00000000000
--- a/src/pages/guides/api-rest/form-api-with-dynamodb-and-lambda/q/platform/[platform].mdx
+++ /dev/null
@@ -1,8 +0,0 @@
-export const meta = {
- title: `Creating a Form API with DynamoDB and Lambda`,
- description: `How to build and interact with a form API with DynamoDB and Lambda`,
-};
-
-import js0 from "/src/fragments/guides/api-rest/js/form-api-with-dynamodb-and-lambda.mdx";
-
-
diff --git a/src/pages/guides/api-rest/gen-ai/index.mdx b/src/pages/guides/api-rest/gen-ai/index.mdx
new file mode 100644
index 00000000000..14baf130f73
--- /dev/null
+++ b/src/pages/guides/api-rest/gen-ai/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-rest/gen-ai/q/platform/[platform].mdx b/src/pages/guides/api-rest/gen-ai/q/platform/[platform].mdx
new file mode 100644
index 00000000000..a3043ee8331
--- /dev/null
+++ b/src/pages/guides/api-rest/gen-ai/q/platform/[platform].mdx
@@ -0,0 +1,433 @@
+export const meta = {
+ title: `Build a generative AI sandbox with Amplify and Amazon Bedrock`,
+ description: `How to build a generative AI sandbox with Amazon Bedrock and AWS Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+## Overview
+
+AWS Amplify helps you build and deploy generative AI applications by providing you with the tools needed to build a fullstack application that integrates with [Amazon Bedrock](https://aws.amazon.com/bedrock/). Amazon Bedrock is a fully managed service that provides access to Foundation Models (FMs) so you can build generative AI applications easily and not worry about managing AI infrastructure. Integrating generative AI capabilities into your application or building your own generative AI application requires more than just making calls to a foundation model. To build a fullstack generative AI application, in addition to Amazon Bedrock, you will need:
+
+1. Authentication
+2. API layer
+3. Hosting
+4. Accessible UI
+
+With Amplify and Amazon Bedrock, you can create a generative AI application easily in under an hour. This guide will walk you through the steps of building a generative AI sandbox.
+
+## Project setup
+
+For this we will use React and Next.js to take advantage of the full managed hosting of Next.js server-side rendering (SSR) capabilities in Amplify Hosting. The first step is to create a new Next.js project using yarn, npm, pnpm, or Bun.
+
+```bash
+npx create-next-app@latest
+```
+
+```bash
+✔ Would you like to use TypeScript with this project? … No / Yes
+✔ Would you like to use ESLint with this project? … No / Yes
+✔ Would you like to use Tailwind CSS with this project? … No / Yes
+✔ Would you like to use `src/` directory with this project? … No / Yes
+✔ Would you like to use experimental `app/` directory with this project? … No / Yes
+✔ What import alias would you like configured? … @/*
+```
+
+For this project we will use the Next.js Pages router. Feel free to change the settings to your liking. Then go into your newly created Next.js app and add Amplify to your project with the Amplify CLI:
+
+```bash
+amplify init
+```
+
+```bash
+? Enter a name for the project amplify-gen-ai
+The following configuration will be applied:
+
+Project information
+| Name: amplify-gen-ai
+| Environment: dev
+| Default editor: Visual Studio Code
+| App type: javascript
+| Javascript framework: react
+| Source Directory Path: src
+| Distribution Directory Path: build
+| Build Command: npm run-script build
+| Start Command: npm run-script start
+? Initialize the project with the above configuration? Yes
+```
+
+### Add authentication
+
+While adding authentication to your app is optional, allowing anyone to use an LLM through your app without authenticating is not recommended in practice. This is because requests to an LLM incur costs based on the amount of text sent to and received from the LLM. Most LLMs, like Amazon Bedrock, also enforce rate limits.
+
+You can add authentication to your application with the Amplify CLI or Amplify Studio. For this, we will use the CLI:
+
+```bash
+amplify add auth
+```
+
+The output from the CLI should look like this:
+
+```bash
+Using service: Cognito, provided by: awscloudformation
+
+ The current configured provider is Amazon Cognito.
+
+ Do you want to use the default authentication and security configuration? _**Default configuration**_
+ Warning: you will not be able to edit these selections.
+ How do you want users to be able to sign in? _**Email**_
+ Do you want to configure advanced settings? _**No, I am done.**_
+```
+
+Then push your Amplify project to the cloud:
+
+```bash
+amplify push
+```
+
+You should see:
+
+```bash
+✔ Successfully pulled backend environment dev from the cloud.
+
+ Current Environment: dev
+
+┌──────────┬──────────────────────┬───────────┬───────────────────┐
+│ Category │ Resource name │ Operation │ Provider plugin │
+├──────────┼──────────────────────┼───────────┼───────────────────┤
+│ Auth │ amplifyGenAi │ Create │ awscloudformation │
+└──────────┴──────────────────────┴───────────┴───────────────────┘
+```
+
+### Configure Amplify
+
+Add the frontend packages for Amplify and Amplify UI:
+
+```bash
+npm i --save @aws-amplify/ui-react aws-amplify
+```
+
+Then add these imports to the top of the **src/pages/\_app.tsx** :
+
+```js
+import '@aws-amplify/ui-react/styles.css';
+import { Amplify } from 'aws-amplify';
+import awsconfig from '../aws-exports';
+```
+
+And then after the imports, add this to configure Amplify:
+
+```js
+Amplify.configure({
+ ...awsconfig,
+ // this lets you run Amplify code on the server-side in Next.js
+ ssr: true
+});
+```
+
+Then wrap the `` in JSX with the `Authenticator` component from '@aws-amplify/ui-react'. Your file should now look like this:
+
+```js
+import '@aws-amplify/ui-react/styles.css';
+import { Amplify } from 'aws-amplify';
+import awsconfig from '../aws-exports';
+import type { AppProps } from 'next/app';
+import { Authenticator } from '@aws-amplify/ui-react';
+
+Amplify.configure({
+ ...awsconfig,
+ // this lets you run Amplify code on the server-side in Next.js
+ ssr: true
+});
+
+export default function App({ Component, pageProps }: AppProps) {
+ return (
+
+
+
+ );
+}
+```
+
+If you start up your local dev server, you should now see this:
+
+![Amplify authenticator login form with email and password fields and sign in button. ](/images/gen-ai/login-form.png)
+
+Create an account for yourself for testing. Once you log in, you should see the default Next.js starter homepage.
+
+### Add an API layer
+
+Add the Amazon Bedrock SDK to your dependencies:
+
+```bash
+npm i --save @aws-sdk/client-bedrock-runtime
+```
+
+The default Next.js template with the Pages router should come with an example API route at **src/pages/api/hello.ts.** Let’s rename that file to **chat.ts**. The first thing we will need to do in this file is configure Amplify on the server-side. To do that, you will import Amplify and your Amplify config file that Amplify creates for you.
+
+```js
+import { Amplify } from 'aws-amplify';
+import awsconfig from '@/aws-exports';
+
+Amplify.configure({
+ ...awsconfig,
+ ssr: true
+});
+```
+
+Then, to get the Authentication credentials, import `withSSRContext` from `aws-amplify`. Change the default handler function to an async function.
+
+```diff
+- export default function handler(
++ export default async function handler(
+```
+
+Then, in the body of the function, create an SSR context:
+
+```js
+const SSR = withSSRContext({ req });
+```
+
+This will give you access to all the Amplify Library functionality on the server-side, like using the Auth module. To get the current credentials of the user, include the following:
+
+```js
+const credentials = await SSR.Auth.currentCredentials();
+```
+
+To test that this is working, you can output the credentials to the console and boot up your local server again. Let’s do that to make sure everything is working so far. In **src/pages/index.tsx,** create a function called `callAPI` that does a `fetch` to our API endpoint:
+
+```js
+const callAPI = () => {
+ fetch('/api/hello');
+};
+```
+
+Then in the JSX of the page, add a button that calls our `callAPI` function on click:
+
+```jsx
+
+```
+
+If you are logged in and click the button, your authentication credentials should print to the console in your terminal.
+
+```js
+fetch('/api/hello', {
+ method: 'POST',
+ body: JSON.stringify({ input: 'Who are you?' })
+});
+```
+
+Open **src/pages/api/chat.ts** and remove that `console.log` and initialize the Amazon Bedrock client with your user’s credentials:
+
+```js
+const bedrock = new BedrockRuntimeClient({
+ serviceId: 'bedrock',
+ region: 'us-east-1',
+ credentials
+});
+```
+
+Then you can send the Bedrock client the `InvokeModel` command. Here is the full **chat.ts** file with comments for what it is doing.
+
+```js
+import {
+ BedrockRuntimeClient,
+ InvokeModelCommand
+} from '@aws-sdk/client-bedrock-runtime';
+import { Amplify, withSSRContext } from 'aws-amplify';
+import type { NextApiRequest, NextApiResponse } from 'next';
+import awsExports from '@/aws-exports';
+
+Amplify.configure({
+ ...awsExports,
+ ssr: true
+});
+
+export default async function handler(
+ req: NextApiRequest,
+ res: NextApiResponse
+) {
+ const body = JSON.parse(req.body);
+ const SSR = withSSRContext({ req });
+ const credentials = await SSR.Auth.currentCredentials();
+ const bedrock = new BedrockRuntimeClient({
+ serviceId: 'bedrock',
+ region: 'us-east-1',
+ credentials
+ });
+
+ // Anthropic's Claude model expects a chat-like string
+ // of 'Human:' and 'Assistant:' responses separated by line breaks.
+ // You should always end your prompt with 'Assistant:' and Claude
+ // will respond. There are various prompt engineering techniques
+ // and frameworks like LangChain you can use here too.
+ const prompt = `Human:${body.input}\n\nAssistant:`;
+
+ const result = await bedrock.send(
+ new InvokeModelCommand({
+ modelId: 'anthropic.claude-v2',
+ contentType: 'application/json',
+ accept: '*/*',
+ body: JSON.stringify({
+ prompt,
+ // LLM costs are measured by Tokens, which are roughly equivalent
+ // to 1 word. This option allows you to set the maximum amount of
+ // tokens to return
+ max_tokens_to_sample: 2000,
+ // Temperature (1-0) is how 'creative' the LLM should be in its response
+ // 1: deterministic, prone to repeating
+ // 0: creative, prone to hallucinations
+ temperature: 1,
+ top_k: 250,
+ top_p: 0.99,
+ // This tells the model when to stop its response. LLMs
+ // generally have a chat-like string of Human and Assistant message
+ // This says stop when the Assistant (Claude) is done and expects
+ // the human to respond
+ stop_sequences: ['\n\nHuman:'],
+ anthropic_version: 'bedrock-2023-05-31'
+ })
+ })
+ );
+ // The response is a Uint8Array of a stringified JSON blob
+ // so you need to first decode the Uint8Array to a string
+ // then parse the string.
+ res.status(200).json(JSON.parse(new TextDecoder().decode(result.body)));
+}
+```
+
+Then update the `callAPI` function in your frontend to accept a JSON response:
+
+```js
+fetch('/api/hello', {
+ method: 'POST',
+ body: JSON.stringify({ input: 'Who are you?' })
+})
+ .then((res) => res.json())
+ .then((data) => {
+ console.log(data);
+ });
+```
+
+But if you click that button, you will see this in your terminal:
+
+```
+ ⨯ AccessDeniedException: User: arn:aws:sts::553879240338:assumed-role/amplify-amplifyGenAi-dev-205330-authRole/CognitoIdentityCredentials is not authorized to perform: bedrock:InvokeModel on resource:
+```
+
+When you create an Authentication backend with Amplify, it sets up Amazon Cognito and creates two IAM roles, one for unauthenticated users and another for authenticated users. These IAM roles let AWS know what resources your authenticated and guest users can access. We didn’t give our authenticated users access to Amazon Bedrock yet. Let’s do that now.
+
+You can update the IAM policies Amplify creates with an [override](https://docs.amplify.aws/cli/project/override/). Run this command:
+
+```
+amplify override project
+```
+
+Edit the **override.ts** file it creates and add a policy to allow the authenticated role access to Amazon Bedrock’s `InvokeModel` command like this:
+
+```js
+import {
+ AmplifyProjectInfo,
+ AmplifyRootStackTemplate
+} from '@aws-amplify/cli-extensibility-helper';
+
+export function override(
+ resources: AmplifyRootStackTemplate,
+ amplifyProjectInfo: AmplifyProjectInfo
+) {
+ const authRole = resources.authRole;
+
+ const basePolicies = Array.isArray(authRole.policies)
+ ? authRole.policies
+ : [authRole.policies];
+
+ authRole.policies = [
+ ...basePolicies,
+ {
+ policyName: '',
+ policyDocument: {
+ Version: '2012-10-17',
+ Statement: [
+ {
+ Effect: 'Allow',
+ Action: 'bedrock:InvokeModel',
+ Resource:
+ 'arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2'
+ }
+ ]
+ }
+ }
+ ];
+}
+```
+
+Run `amplify push` to sync your changes with the cloud. Now restart your local Next.js server and try to call Amazon Bedrock again through your API route.
+
+![Object with text {completion: "I'm Claude, an AI assistant created by Anthropic"}](/images/gen-ai/claude.png)
+
+## Hosting
+
+The last thing to do is to add hosting to our Next.js application. Amplify has you covered there too. Create a new Git repository in GitHub, Bitbucket, or GitLab. Commit your code and push it to the git provider of your choice. Let’s use GitHub as an example. If you have the [GitHub CLI](https://cli.github.com/) installed, you can run:
+
+```bash
+gh repo create
+```
+
+```bash
+? What would you like to do? Push an existing local repository to GitHub
+? Path to local repository .
+? Repository name amplify-gen-ai
+? Repository owner danny
+? Description
+? Visibility Private
+✓ Created repository danny/amplify-gen-ai on GitHub
+? Add a remote? Yes
+? What should the new remote be called? origin
+✓ Added remote git@github.com:danny/amplify-gen-ai.git
+? Would you like to push commits from the current branch to "origin"? Yes
+```
+
+Now we can add Amplify Hosting from the Amplify CLI:
+
+```bash
+amplify add hosting
+```
+
+![Amplify Build Settings form](/images/gen-ai/build-settings.png)
+
+```bash
+✔ Select the plugin module to execute · Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
+
+? Choose a type Continuous deployment (Git-based deployments)
+? Continuous deployment is configured in the Amplify Console. Please hit enter once you connect your repository
+Amplify hosting urls:
+┌──────────────┬───────────────────────────────────────────┐
+│ FrontEnd Env │ Domain │
+├──────────────┼───────────────────────────────────────────┤
+│ main │ https://main.dade6up5cdfhu.amplifyapp.com │
+```
+
+Now you have a hosted fullstack application using Amplify connected to Amazon Bedrock.
+
+If you are using TypeScript, you will need to ignore the Amplify directory in the tsconfig file at the root of your project or you might get a type error when Amplify tries to build your Next.js application. Update the "exclude" array in your tsconfig to have "amplify":
+
+```js
+"exclude": ["node_modules","amplify"]
+```
diff --git a/src/pages/guides/api-rest/go-api/index.mdx b/src/pages/guides/api-rest/go-api/index.mdx
new file mode 100644
index 00000000000..8cc6339bf4c
--- /dev/null
+++ b/src/pages/guides/api-rest/go-api/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-rest/go-api/q/platform/[platform].mdx b/src/pages/guides/api-rest/go-api/q/platform/[platform].mdx
index 07f28358ee2..5e3be1133fd 100644
--- a/src/pages/guides/api-rest/go-api/q/platform/[platform].mdx
+++ b/src/pages/guides/api-rest/go-api/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Go API`,
description: `How to deploy a Go API using Amplify Functions`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide, you will learn how to deploy a Go API.
@@ -37,7 +56,7 @@ The CLI should have created a new function located at **amplify/backend/function
## 3. Updating the function code
-Next, open **amplify/backend/function/greetingfunction/src/main.go** and update the code to the following:
+Next, open **amplify/backend/function/greetingfunction/src/main.go** and update the code to the following:
```go
package main
@@ -96,17 +115,17 @@ amplify push
Here is how you can send a GET request to the API.
-import js0 from "/src/fragments/guides/api-rest/js/go-api-call.mdx";
+import js0 from '/src/fragments/guides/api-rest/js/go-api-call.mdx';
-
+
-import ios1 from "/src/fragments/guides/api-rest/ios/rest-api-call.mdx";
+import ios1 from '/src/fragments/guides/api-rest/ios/rest-api-call.mdx';
-
+
-import android2 from "/src/fragments/guides/api-rest/android/rest-api-call.mdx";
+import android2 from '/src/fragments/guides/api-rest/android/rest-api-call.mdx';
-
+
To learn more about interacting with REST APIs using Amplify, check out the complete documentation [here](/lib/restapi/getting-started).
diff --git a/src/pages/guides/api-rest/node-api/index.mdx b/src/pages/guides/api-rest/node-api/index.mdx
new file mode 100644
index 00000000000..4a4e93ec187
--- /dev/null
+++ b/src/pages/guides/api-rest/node-api/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-rest/node-api/q/platform/[platform].mdx b/src/pages/guides/api-rest/node-api/q/platform/[platform].mdx
index b0edf496faa..237a6153e89 100644
--- a/src/pages/guides/api-rest/node-api/q/platform/[platform].mdx
+++ b/src/pages/guides/api-rest/node-api/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `NodeJS API`,
description: `How to deploy a NodeJS API using Amplify Functions`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide, you will learn how to deploy a Node.js API.
@@ -38,19 +57,19 @@ The CLI should have created a new function located at **amplify/backend/function
## 3. Updating the function code
-Next, open **amplify/backend/function/greetingfunction/src/index.js** and update the code to the following:
+Next, open **amplify/backend/function/greetingfunction/src/index.js** and update the code to the following:
```js
exports.handler = async (event) => {
const body = {
- message: "Hello from Lambda"
- }
+ message: 'Hello from Lambda'
+ };
const response = {
- statusCode: 200,
- body: JSON.stringify(body),
- headers: {
- "Access-Control-Allow-Origin": "*",
- }
+ statusCode: 200,
+ body: JSON.stringify(body),
+ headers: {
+ 'Access-Control-Allow-Origin': '*'
+ }
};
return response;
};
@@ -68,17 +87,17 @@ amplify push
Here is how you can send a GET request to the API.
-import js0 from "/src/fragments/guides/api-rest/js/rest-api-call.mdx";
+import js0 from '/src/fragments/guides/api-rest/js/rest-api-call.mdx';
-
+
-import ios1 from "/src/fragments/guides/api-rest/ios/rest-api-call.mdx";
+import ios1 from '/src/fragments/guides/api-rest/ios/rest-api-call.mdx';
-
+
-import android2 from "/src/fragments/guides/api-rest/android/rest-api-call.mdx";
+import android2 from '/src/fragments/guides/api-rest/android/rest-api-call.mdx';
-
+
To learn more about interacting with REST APIs using Amplify, check out the complete documentation [here](/lib/restapi/getting-started).
diff --git a/src/pages/guides/api-rest/python-api/index.mdx b/src/pages/guides/api-rest/python-api/index.mdx
new file mode 100644
index 00000000000..d90bb3628df
--- /dev/null
+++ b/src/pages/guides/api-rest/python-api/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/api-rest/python-api/q/platform/[platform].mdx b/src/pages/guides/api-rest/python-api/q/platform/[platform].mdx
index 71092bd1e34..8b5e7a55f14 100644
--- a/src/pages/guides/api-rest/python-api/q/platform/[platform].mdx
+++ b/src/pages/guides/api-rest/python-api/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Python API`,
description: `How to deploy a Python API using Amplify Functions`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide, you will learn how to deploy a Python API.
@@ -37,7 +56,7 @@ The CLI should have created a new function located at **amplify/backend/function
## 3. Updating the function code
-Next, open **amplify/backend/function/greetingfunction/src/index.py** and update the code to the following:
+Next, open **amplify/backend/function/greetingfunction/src/index.py** and update the code to the following:
```python
import json
@@ -59,7 +78,7 @@ def handler(event, context):
'Access-Control-Allow-Origin': '*'
},
}
-
+
return response
```
@@ -75,17 +94,17 @@ amplify push
Here is how you can send a GET request to the API.
-import js0 from "/src/fragments/guides/api-rest/js/python-api-call.mdx";
+import js0 from '/src/fragments/guides/api-rest/js/python-api-call.mdx';
-
+
-import ios1 from "/src/fragments/guides/api-rest/ios/rest-api-call.mdx";
+import ios1 from '/src/fragments/guides/api-rest/ios/rest-api-call.mdx';
-
+
-import android2 from "/src/fragments/guides/api-rest/android/rest-api-call.mdx";
+import android2 from '/src/fragments/guides/api-rest/android/rest-api-call.mdx';
-
+
To learn more about interacting with REST APIs using Amplify, check out the complete documentation [here](/lib/restapi/getting-started).
diff --git a/src/pages/guides/authentication/custom-auth-flow/index.mdx b/src/pages/guides/authentication/custom-auth-flow/index.mdx
new file mode 100644
index 00000000000..c9f4adbb03f
--- /dev/null
+++ b/src/pages/guides/authentication/custom-auth-flow/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/authentication/custom-auth-flow/q/platform/[platform].mdx b/src/pages/guides/authentication/custom-auth-flow/q/platform/[platform].mdx
index 95f6d24c20b..1e078fede7b 100644
--- a/src/pages/guides/authentication/custom-auth-flow/q/platform/[platform].mdx
+++ b/src/pages/guides/authentication/custom-auth-flow/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Creating a custom authentication flow`,
description: `Creating a custom authentication flow with AWS Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/authentication/js/custom-auth-flow.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/authentication/js/custom-auth-flow.mdx';
+
+
diff --git a/src/pages/guides/authentication/email-only-authentication/index.mdx b/src/pages/guides/authentication/email-only-authentication/index.mdx
new file mode 100644
index 00000000000..90b1d0cf368
--- /dev/null
+++ b/src/pages/guides/authentication/email-only-authentication/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/authentication/email-only-authentication/q/platform/[platform].mdx b/src/pages/guides/authentication/email-only-authentication/q/platform/[platform].mdx
index 434eb284f5f..d0b0c5f3ecf 100644
--- a/src/pages/guides/authentication/email-only-authentication/q/platform/[platform].mdx
+++ b/src/pages/guides/authentication/email-only-authentication/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Email-only sign up and sign in`,
description: `Enabling users to authenticate with only their email`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/authentication/js/email-only-authentication.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/authentication/js/email-only-authentication.mdx';
+
+
diff --git a/src/pages/guides/authentication/listening-for-auth-events/index.mdx b/src/pages/guides/authentication/listening-for-auth-events/index.mdx
new file mode 100644
index 00000000000..0fe2a95b61d
--- /dev/null
+++ b/src/pages/guides/authentication/listening-for-auth-events/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/authentication/listening-for-auth-events/q/platform/[platform].mdx b/src/pages/guides/authentication/listening-for-auth-events/q/platform/[platform].mdx
index 9fd59f4ba1d..2212d7d9ee0 100644
--- a/src/pages/guides/authentication/listening-for-auth-events/q/platform/[platform].mdx
+++ b/src/pages/guides/authentication/listening-for-auth-events/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Listening for authentication events`,
description: `Listening for auth events using the Hub utility`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/authentication/js/listening-for-auth-events.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/authentication/js/listening-for-auth-events.mdx';
+
+
diff --git a/src/pages/guides/authentication/managing-user-attributes/index.mdx b/src/pages/guides/authentication/managing-user-attributes/index.mdx
new file mode 100644
index 00000000000..5e5c01f4bef
--- /dev/null
+++ b/src/pages/guides/authentication/managing-user-attributes/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/authentication/managing-user-attributes/q/platform/[platform].mdx b/src/pages/guides/authentication/managing-user-attributes/q/platform/[platform].mdx
index fb3094c7c07..cd9a49e0d68 100644
--- a/src/pages/guides/authentication/managing-user-attributes/q/platform/[platform].mdx
+++ b/src/pages/guides/authentication/managing-user-attributes/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Managing user attributes`,
description: `How to manage standard and custom user attributes`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/authentication/js/managing-user-attributes.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/authentication/js/managing-user-attributes.mdx';
+
+
diff --git a/src/pages/guides/datastore/parallel-processing/index.mdx b/src/pages/guides/datastore/parallel-processing/index.mdx
new file mode 100644
index 00000000000..d431db22768
--- /dev/null
+++ b/src/pages/guides/datastore/parallel-processing/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/datastore/parallel-processing/q/platform/[platform].mdx b/src/pages/guides/datastore/parallel-processing/q/platform/[platform].mdx
index 3c3608385e1..9d3606ac8c8 100644
--- a/src/pages/guides/datastore/parallel-processing/q/platform/[platform].mdx
+++ b/src/pages/guides/datastore/parallel-processing/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Parallel Processing`,
description: `How to multiple DataStore operations in parallel.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from "/src/fragments/guides/datastore/parallel-processing-ios.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import ios0 from '/src/fragments/guides/datastore/parallel-processing-ios.mdx';
+
+
diff --git a/src/pages/guides/functions/appsync-operations-to-lambda-layer/index.mdx b/src/pages/guides/functions/appsync-operations-to-lambda-layer/index.mdx
new file mode 100644
index 00000000000..39bb066234f
--- /dev/null
+++ b/src/pages/guides/functions/appsync-operations-to-lambda-layer/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform/[platform].mdx b/src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform/[platform].mdx
index 4f17db8f830..9643bc04654 100644
--- a/src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Exporting AppSync operations to a Lambda layer for easy reuse`,
description: `How to export your AppSync operations to a Lambda layer for easy reuse in your Lambda functions`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
When you need to call your AppSync API from a Lambda function, you can export your AppSync operations generated by Amplify to a Lambda layer. This reduces the amount of duplicated code, and allows you to interact with the API from Lambda functions across multiple projects.
@@ -28,10 +47,10 @@ In the `./amplify/backend/function/appsyncOperations/opt` folder add the followi
```javascript
// amplify/backend/function/appsyncOperations/opt/appSyncRequest.js
-const https = require('https')
-const AWS = require('aws-sdk')
-const urlParse = require('url').URL
-const region = process.env.REGION
+const https = require('https');
+const AWS = require('aws-sdk');
+const urlParse = require('url').URL;
+const region = process.env.REGION;
/**
*
@@ -40,38 +59,38 @@ const region = process.env.REGION
* @param {String} apiKey the api key to include in headers. if null, will sign with SigV4
*/
exports.request = (queryDetails, appsyncUrl, apiKey) => {
- const req = new AWS.HttpRequest(appsyncUrl, region)
- const endpoint = new urlParse(appsyncUrl).hostname.toString()
+ const req = new AWS.HttpRequest(appsyncUrl, region);
+ const endpoint = new urlParse(appsyncUrl).hostname.toString();
- req.method = 'POST'
- req.path = '/graphql'
- req.headers.host = endpoint
- req.headers['Content-Type'] = 'application/json'
- req.body = JSON.stringify(queryDetails)
+ req.method = 'POST';
+ req.path = '/graphql';
+ req.headers.host = endpoint;
+ req.headers['Content-Type'] = 'application/json';
+ req.body = JSON.stringify(queryDetails);
if (apiKey) {
- req.headers['x-api-key'] = apiKey
+ req.headers['x-api-key'] = apiKey;
} else {
- const signer = new AWS.Signers.V4(req, 'appsync', true)
- signer.addAuthorization(AWS.config.credentials, AWS.util.date.getDate())
+ const signer = new AWS.Signers.V4(req, 'appsync', true);
+ signer.addAuthorization(AWS.config.credentials, AWS.util.date.getDate());
}
return new Promise((resolve, reject) => {
const httpRequest = https.request({ ...req, host: endpoint }, (result) => {
- let response = ''
+ let response = '';
result.on('data', (chunk) => {
- response += chunk
- })
+ response += chunk;
+ });
result.on('end', () => {
- response = JSON.parse(response)
- resolve(response)
- })
- })
-
- httpRequest.write(req.body)
- httpRequest.end()
- })
-}
+ response = JSON.parse(response);
+ resolve(response);
+ });
+ });
+
+ httpRequest.write(req.body);
+ httpRequest.end();
+ });
+};
```
## Generate compatible code for your layer
@@ -133,12 +152,12 @@ You can push your changes to the cloud with `amplify push`.
You can now assign the layer to Lambda functions to easily call your AppSync API. Here's how you can leverage it in a Lambda function that has IAM permissions to call your AppSync API.
```javascript
-const appsyncUrl = process.env.API_AMPLIFYLAYERGUIDE_GRAPHQLAPIENDPOINTOUTPUT
-const apiKey = process.env.API_AMPLIFYLAYERGUIDE_GRAPHQLAPIKEYOUTPUT
+const appsyncUrl = process.env.API_AMPLIFYLAYERGUIDE_GRAPHQLAPIENDPOINTOUTPUT;
+const apiKey = process.env.API_AMPLIFYLAYERGUIDE_GRAPHQLAPIKEYOUTPUT;
-const { request } = require('/opt/appsyncRequest')
-const { createTodo } = require('/opt/graphql/mutations')
-const { listTodos } = require('/opt/graphql/queries')
+const { request } = require('/opt/appsyncRequest');
+const { createTodo } = require('/opt/graphql/mutations');
+const { listTodos } = require('/opt/graphql/queries');
exports.handler = async (event) => {
try {
@@ -149,26 +168,26 @@ exports.handler = async (event) => {
variables: {
input: {
name: 'new todo',
- description: 'the first',
- },
- },
+ description: 'the first'
+ }
+ }
},
appsyncUrl
- )
- console.log('iam results:', result)
-
+ );
+ console.log('iam results:', result);
+
// Now, retrieve all TODOs using API_KEY auth
result = await request(
{
query: listTodos,
- operationName: 'ListTodos',
+ operationName: 'ListTodos'
},
appsyncUrl,
apiKey
- )
- console.log('api key results', result)
+ );
+ console.log('api key results', result);
} catch (error) {
- console.log(error)
+ console.log(error);
}
-}
+};
```
diff --git a/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/index.mdx b/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/index.mdx
new file mode 100644
index 00000000000..4a55b7e75c3
--- /dev/null
+++ b/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/q/platform/[platform].mdx b/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/q/platform/[platform].mdx
index a917ecb2743..8f23eae1c3f 100644
--- a/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/cognito-trigger-lambda-dynamodb/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Calling DynamoDB using AWS Cognito triggers`,
description: `How to add an entry in DynamoDB, with user's information after sign-up post-confirmation`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
If you are using AWS Cognito to handle authentication in your application you can use triggers to handle authentication
diff --git a/src/pages/guides/functions/connecting-a-rest-api/index.mdx b/src/pages/guides/functions/connecting-a-rest-api/index.mdx
new file mode 100644
index 00000000000..fc1dd16728c
--- /dev/null
+++ b/src/pages/guides/functions/connecting-a-rest-api/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/connecting-a-rest-api/q/platform/[platform].mdx b/src/pages/guides/functions/connecting-a-rest-api/q/platform/[platform].mdx
index cb2afe35ae5..bcc19305901 100644
--- a/src/pages/guides/functions/connecting-a-rest-api/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/connecting-a-rest-api/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Connecting a REST API to a Lambda function`,
description: `How to connect a REST API to a Lambda function`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to connect a REST API to an existing Lambda function.
@@ -27,4 +46,4 @@ amplify push
Your API is now ready to use!
-To learn more about how to interact with the API from a client-side application, check out the docs [here](/lib/restapi/getting-started)
\ No newline at end of file
+To learn more about how to interact with the API from a client-side application, check out the docs [here](/lib/restapi/getting-started)
diff --git a/src/pages/guides/functions/dynamodb-from-js-lambda/index.mdx b/src/pages/guides/functions/dynamodb-from-js-lambda/index.mdx
new file mode 100644
index 00000000000..87756b2396e
--- /dev/null
+++ b/src/pages/guides/functions/dynamodb-from-js-lambda/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/dynamodb-from-js-lambda/q/platform/[platform].mdx b/src/pages/guides/functions/dynamodb-from-js-lambda/q/platform/[platform].mdx
index 3e96b04bbd4..ffa373f84b8 100644
--- a/src/pages/guides/functions/dynamodb-from-js-lambda/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/dynamodb-from-js-lambda/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Calling DynamoDB from Lambda in Node.js`,
description: `How to interact with a DynamoDB database from a Lambda function in Node.js`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
The easiest way to interact with DynamoDB from Lambda in a Node.js environment is to use the [DynamoDB document client](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html). In this guide you will learn how to interact with a DynamoDB database from a Lambda function using the Node.js runtime.
@@ -16,21 +35,20 @@ const AWS = require('aws-sdk');
const docClient = new AWS.DynamoDB.DocumentClient();
const params = {
- TableName : 'your-table-name',
+ TableName: 'your-table-name',
/* Item properties will depend on your application concerns */
Item: {
- id: '12345',
- price: 100.00
+ id: '12345',
+ price: 100.0
}
-}
+};
exports.handler = async (event) => {
try {
await docClient.put(params).promise();
- return { body: 'Successfully created item!' }
+ return { body: 'Successfully created item!' };
} catch (err) {
-
- return { error: err }
+ return { error: err };
}
};
```
@@ -44,21 +62,21 @@ const AWS = require('aws-sdk');
const docClient = new AWS.DynamoDB.DocumentClient();
const params = {
- TableName : 'your-table-name',
+ TableName: 'your-table-name',
/* Item properties will depend on your application concerns */
Key: {
id: '12345'
}
-}
+};
exports.handler = async (event, context) => {
try {
- const data = await docClient.get(params).promise()
- return { body: JSON.stringify(data) }
+ const data = await docClient.get(params).promise();
+ return { body: JSON.stringify(data) };
} catch (err) {
- return { error: err }
+ return { error: err };
}
-}
+};
```
### Scanning a table
@@ -70,17 +88,17 @@ const AWS = require('aws-sdk');
const docClient = new AWS.DynamoDB.DocumentClient();
const params = {
- TableName : 'your-table-name'
-}
+ TableName: 'your-table-name'
+};
exports.handler = async (event, context) => {
try {
- const data = await docClient.scan(params).promise()
- return { body: JSON.stringify(data) }
+ const data = await docClient.scan(params).promise();
+ return { body: JSON.stringify(data) };
} catch (err) {
- return { error: err }
+ return { error: err };
}
-}
+};
```
### Querying a table
@@ -97,16 +115,16 @@ var params = {
KeyConditionExpression: '#name = :value',
ExpressionAttributeValues: { ':value': 'shoes' },
ExpressionAttributeNames: { '#name': 'name' }
-}
+};
exports.handler = async (event, context) => {
try {
- const data = await docClient.query(params).promise()
- return { body: JSON.stringify(data) }
+ const data = await docClient.query(params).promise();
+ return { body: JSON.stringify(data) };
} catch (err) {
- return { error: err }
+ return { error: err };
}
-}
+};
```
### Delete an item from a table
@@ -124,14 +142,14 @@ var params = {
id: '12345'
},
ReturnValues: NONE | ALL_OLD | UPDATED_OLD | ALL_NEW | UPDATED_NEW
-}
+};
exports.handler = async (event, context) => {
try {
- const data = await docClient.delete(params).promise()
- return { body: JSON.stringify(data) }
+ const data = await docClient.delete(params).promise();
+ return { body: JSON.stringify(data) };
} catch (err) {
- return { error: err }
+ return { error: err };
}
-}
-```
\ No newline at end of file
+};
+```
diff --git a/src/pages/guides/functions/dynamodb-from-python-lambda/index.mdx b/src/pages/guides/functions/dynamodb-from-python-lambda/index.mdx
new file mode 100644
index 00000000000..329734a7a33
--- /dev/null
+++ b/src/pages/guides/functions/dynamodb-from-python-lambda/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/dynamodb-from-python-lambda/q/platform/[platform].mdx b/src/pages/guides/functions/dynamodb-from-python-lambda/q/platform/[platform].mdx
index 5e7ecedf63a..332be04d7c6 100644
--- a/src/pages/guides/functions/dynamodb-from-python-lambda/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/dynamodb-from-python-lambda/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Calling DynamoDB from a Lambda function in Python`,
description: `How to interact with a DynamoDB database from a Lambda function in Python`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
The easiest way to interact with DynamoDB from Lambda in a Python environment is to use the [boto3 DynamoDB client](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html). In this guide you will learn how to interact with a DynamoDB database from a Lambda function using the Python runtime.
@@ -14,6 +33,7 @@ $ cd amplify/backend/function/your-function-name
$ pipenv shell
$ pipenv install boto3
```
+
### Creating an item in DynamoDB from Lambda
To create an item in DynamoDB you can use the `put` method:
@@ -47,7 +67,7 @@ def handler(event, context):
'Access-Control-Allow-Origin': '*'
},
}
-
+
return response
```
@@ -79,7 +99,7 @@ def handler(event, context):
'Access-Control-Allow-Origin': '*'
},
}
-
+
return response
```
@@ -106,7 +126,7 @@ def handler(event, context):
'Access-Control-Allow-Origin': '*'
},
}
-
+
return response
```
@@ -143,6 +163,6 @@ def handler(event, context):
'Access-Control-Allow-Origin': '*'
},
}
-
+
return response
```
diff --git a/src/pages/guides/functions/graphql-from-lambda/index.mdx b/src/pages/guides/functions/graphql-from-lambda/index.mdx
new file mode 100644
index 00000000000..74029424e47
--- /dev/null
+++ b/src/pages/guides/functions/graphql-from-lambda/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/graphql-from-lambda/q/platform/[platform].mdx b/src/pages/guides/functions/graphql-from-lambda/q/platform/[platform].mdx
index 83d2fb106a4..b2bae6823d2 100644
--- a/src/pages/guides/functions/graphql-from-lambda/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/graphql-from-lambda/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Calling GraphQL API from a Lambda function`,
description: `How to interact with a GraphQL API from a Lambda function`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import all0 from "/src/fragments/lib/graphqlapi/graphql-from-node.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import all0 from '/src/fragments/lib/graphqlapi/graphql-from-node.mdx';
+
+
diff --git a/src/pages/guides/functions/graphql-server-in-lambda/index.mdx b/src/pages/guides/functions/graphql-server-in-lambda/index.mdx
new file mode 100644
index 00000000000..25ec256b500
--- /dev/null
+++ b/src/pages/guides/functions/graphql-server-in-lambda/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/graphql-server-in-lambda/q/platform/[platform].mdx b/src/pages/guides/functions/graphql-server-in-lambda/q/platform/[platform].mdx
index 541ef814217..b6ca394f368 100644
--- a/src/pages/guides/functions/graphql-server-in-lambda/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/graphql-server-in-lambda/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `GraphQL Server in Lambda`,
description: `How to run an Apollo GraphQL server in a Lambda function`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to run a GraphQL server in a Lambda function. In this example you will be using [Apollo Server](https://www.apollographql.com/docs/) and [Apollo Server Lambda](https://www.apollographql.com/docs/apollo-server/deployment/lambda/), but you can use any server implementation you would like.
diff --git a/src/pages/guides/functions/integrating-dynamodb-with-lambda/index.mdx b/src/pages/guides/functions/integrating-dynamodb-with-lambda/index.mdx
new file mode 100644
index 00000000000..076248e75d7
--- /dev/null
+++ b/src/pages/guides/functions/integrating-dynamodb-with-lambda/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/functions/integrating-dynamodb-with-lambda/q/platform/[platform].mdx b/src/pages/guides/functions/integrating-dynamodb-with-lambda/q/platform/[platform].mdx
index d41a0f52263..f1cc6aa73d4 100644
--- a/src/pages/guides/functions/integrating-dynamodb-with-lambda/q/platform/[platform].mdx
+++ b/src/pages/guides/functions/integrating-dynamodb-with-lambda/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Integrating DynamoDB with Lambda`,
description: `How to integrate a DynamoDB table with a Lambda function`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
In this guide you will learn how to do three things:
@@ -58,7 +77,7 @@ To learn how to interact with DynamoDB from Lambda, check out [Calling DynamoDB
### Creating a new DynamoDB Database and integrate with an existing Lambda function
-First, create the database using the __storage__ category:
+First, create the database using the **storage** category:
```sh
amplify add storage
@@ -127,4 +146,4 @@ amplify push
Your function and database are now ready to use!
-To learn how to interact with DynamoDB from Lambda, check out [Calling DynamoDB from Lambda in Node.js](/guides/functions/dynamodb-from-js-lambda).
\ No newline at end of file
+To learn how to interact with DynamoDB from Lambda, check out [Calling DynamoDB from Lambda in Node.js](/guides/functions/dynamodb-from-js-lambda).
diff --git a/src/pages/guides/hosting/custom-domains/index.mdx b/src/pages/guides/hosting/custom-domains/index.mdx
new file mode 100644
index 00000000000..7f4c1ffd5b2
--- /dev/null
+++ b/src/pages/guides/hosting/custom-domains/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/custom-domains/q/platform/[platform].mdx b/src/pages/guides/hosting/custom-domains/q/platform/[platform].mdx
index 8b8e464448a..1f1cb4a0b1a 100644
--- a/src/pages/guides/hosting/custom-domains/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/custom-domains/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Custom Domains`,
description: `How to enable a custom domain name using Amplify hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/custom-domains.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/custom-domains.mdx';
+
+
diff --git a/src/pages/guides/hosting/gatsby/index.mdx b/src/pages/guides/hosting/gatsby/index.mdx
new file mode 100644
index 00000000000..d18c8ef4cfc
--- /dev/null
+++ b/src/pages/guides/hosting/gatsby/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/gatsby/q/platform/[platform].mdx b/src/pages/guides/hosting/gatsby/q/platform/[platform].mdx
index 5dab7a9c87d..9616dfb056a 100644
--- a/src/pages/guides/hosting/gatsby/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/gatsby/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Gatsby`,
description: `How to deploy a Gatsby site to Amplify Console Hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/gatsby.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/gatsby.mdx';
+
+
diff --git a/src/pages/guides/hosting/git-based-deployments/index.mdx b/src/pages/guides/hosting/git-based-deployments/index.mdx
new file mode 100644
index 00000000000..5e4e2619ab7
--- /dev/null
+++ b/src/pages/guides/hosting/git-based-deployments/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/git-based-deployments/q/platform/[platform].mdx b/src/pages/guides/hosting/git-based-deployments/q/platform/[platform].mdx
index 81a47d0e1e4..24ea2f44eb7 100644
--- a/src/pages/guides/hosting/git-based-deployments/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/git-based-deployments/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Git-based deployments`,
description: `How to deploy a static site to Amplify hosting using a Git repo`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/git-based-deployments.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/git-based-deployments.mdx';
+
+
diff --git a/src/pages/guides/hosting/gridsome/index.mdx b/src/pages/guides/hosting/gridsome/index.mdx
new file mode 100644
index 00000000000..90d5ad2755b
--- /dev/null
+++ b/src/pages/guides/hosting/gridsome/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/gridsome/q/platform/[platform].mdx b/src/pages/guides/hosting/gridsome/q/platform/[platform].mdx
index 487ed8d87c4..a068055202b 100644
--- a/src/pages/guides/hosting/gridsome/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/gridsome/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Gridsome`,
description: `How to deploy a Gridsome site to Amplify Console Hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/gridsome.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/gridsome.mdx';
+
+
diff --git a/src/pages/guides/hosting/local-deployments/index.mdx b/src/pages/guides/hosting/local-deployments/index.mdx
new file mode 100644
index 00000000000..5cfbd51b61f
--- /dev/null
+++ b/src/pages/guides/hosting/local-deployments/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/local-deployments/q/platform/[platform].mdx b/src/pages/guides/hosting/local-deployments/q/platform/[platform].mdx
index 81f3749f3ca..1c068d7eb77 100644
--- a/src/pages/guides/hosting/local-deployments/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/local-deployments/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Local deployments`,
description: `How to deploy a static site to Amplify hosting using a local project`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/local-deployments.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/local-deployments.mdx';
+
+
diff --git a/src/pages/guides/hosting/nextjs/index.mdx b/src/pages/guides/hosting/nextjs/index.mdx
new file mode 100644
index 00000000000..39c578830cf
--- /dev/null
+++ b/src/pages/guides/hosting/nextjs/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/nextjs/q/platform/[platform].mdx b/src/pages/guides/hosting/nextjs/q/platform/[platform].mdx
index 2836d48feee..8d481106248 100644
--- a/src/pages/guides/hosting/nextjs/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/nextjs/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Next.js`,
description: `How to deploy a Next.js Site to Amplify Hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/nextjs.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/nextjs.mdx';
+
+
diff --git a/src/pages/guides/hosting/nuxt/index.mdx b/src/pages/guides/hosting/nuxt/index.mdx
new file mode 100644
index 00000000000..301fdf3edee
--- /dev/null
+++ b/src/pages/guides/hosting/nuxt/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/nuxt/q/platform/[platform].mdx b/src/pages/guides/hosting/nuxt/q/platform/[platform].mdx
index cf4d948a94d..e56172baafd 100644
--- a/src/pages/guides/hosting/nuxt/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/nuxt/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Nuxt.js`,
description: `How to deploy a Nuxt site to Amplify Console Hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/nuxt.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/nuxt.mdx';
+
+
diff --git a/src/pages/guides/hosting/password-protected-deployments/index.mdx b/src/pages/guides/hosting/password-protected-deployments/index.mdx
new file mode 100644
index 00000000000..1d562f3203d
--- /dev/null
+++ b/src/pages/guides/hosting/password-protected-deployments/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/password-protected-deployments/q/platform/[platform].mdx b/src/pages/guides/hosting/password-protected-deployments/q/platform/[platform].mdx
index 5a636b8a18c..652ba4912d9 100644
--- a/src/pages/guides/hosting/password-protected-deployments/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/password-protected-deployments/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Password protected deployments`,
description: `How to enable password-protection for your Amplify web deployments`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/password-protected-deployments.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/password-protected-deployments.mdx';
+
+
diff --git a/src/pages/guides/hosting/pull-request-previews/index.mdx b/src/pages/guides/hosting/pull-request-previews/index.mdx
new file mode 100644
index 00000000000..94fda63718b
--- /dev/null
+++ b/src/pages/guides/hosting/pull-request-previews/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/pull-request-previews/q/platform/[platform].mdx b/src/pages/guides/hosting/pull-request-previews/q/platform/[platform].mdx
index c23afc555fe..ac903a5a15c 100644
--- a/src/pages/guides/hosting/pull-request-previews/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/pull-request-previews/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Pull-request previews`,
description: `How to enable pull-request previews with Amplify hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/guides/hosting/pull-request-previews.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/guides/hosting/pull-request-previews.mdx';
+
+
diff --git a/src/pages/guides/hosting/vite/index.mdx b/src/pages/guides/hosting/vite/index.mdx
new file mode 100644
index 00000000000..8f85a535068
--- /dev/null
+++ b/src/pages/guides/hosting/vite/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/hosting/vite/q/platform/[platform].mdx b/src/pages/guides/hosting/vite/q/platform/[platform].mdx
index 92e3b590c87..bf30069d0f2 100644
--- a/src/pages/guides/hosting/vite/q/platform/[platform].mdx
+++ b/src/pages/guides/hosting/vite/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Vite`,
- description: `How to deploy a Vite site to Amplify Hosting`
+ description: `How to deploy a Vite site to Amplify Hosting`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/guides/hosting/vite.mdx';
diff --git a/src/pages/guides/index.mdx b/src/pages/guides/index.mdx
new file mode 100644
index 00000000000..a0067bb6b47
--- /dev/null
+++ b/src/pages/guides/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { GUIDE_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/guides/q/platform/[platform].mdx b/src/pages/guides/q/platform/[platform].mdx
index 2efc82c3551..60f9dfc9266 100644
--- a/src/pages/guides/q/platform/[platform].mdx
+++ b/src/pages/guides/q/platform/[platform].mdx
@@ -2,7 +2,25 @@ export const meta = {
title: `Guides`,
description: `The Amplify Command Line Interface (CLI) is a unified toolchain to create, integrate, and manage the AWS cloud services for your app. The CLI is category-based with best practices built in. `,
disableTOC: `true`,
- filterKey: `platform`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
Amplify guides are meant to give you a more in-depth understanding of how to use the Amplify CLI, libraries, and hosting to build out common functionality, end-to-end solutions, and frequently asked for workflows.
diff --git a/src/pages/how-amplify-works.mdx b/src/pages/how-amplify-works.mdx
new file mode 100644
index 00000000000..2e6729722c3
--- /dev/null
+++ b/src/pages/how-amplify-works.mdx
@@ -0,0 +1,217 @@
+export const meta = {
+ title: `How Amplify works`,
+ description: `Learn about the capabilities of AWS Amplify and how they can be used together or independently for fullstack app development.`
+};
+
+## Overview
+
+Amplify empowers developers with a flexible collection of modular cloud services and libraries for fullstack application development. Each capability is designed to integrate with the others, while also remaining standalone for customized implementations. Developers can mix and match Amplify capabilities based on their project needs, leveraging only the required building blocks. For example, a developer could use Amplify’s data functionality for their fullstack app’s backend and frontend, just host their app’s frontend, or connect their user interface to an existing AWS resource like an Amazon S3 bucket. This guide explores the different capabilities Amplify provides and how you can use them together or independently.
+
+## Amplify capabilities
+
+Amplify provides tooling for building app backends, connecting app frontends to backend resources, and hosting frontend apps.
+
+For end-to-end fullstack development, you would use Amplify to host your app’s frontend, provision backend resources either visually or through a command line, and build your app’s frontend user interface with Figma-to-code generation and Amplify’s frontend libraries. While this diagram shows a complete Amplify flow, you can also use each piece independently—for example, just host your frontend or use UI components to build out your app’s frontend.
+
+![How Amplify capabilities can be used together or independently.](/images/how-amplify-works/amplify-flow.png)
+
+Let’s look a little closer at the different use cases Amplify enables. In this guide, we will use JavaScript for the code snippets; however, Amplify also supports mobile developers using Swift, Android, and Flutter.
+
+## Building an app
+
+### Data
+
+With Amplify, you can quickly set up a GraphQL or REST API connected to a database.
+
+To add an API to your app’s backend, you can run the following CLI command:
+
+```javascript
+amplify add api
+```
+
+The CLI will display prompts to configure your schema and choose either GraphQL or REST. Answer these prompts in the terminal to set up your API. Amplify will handle the backend setup, including provisioning an API backed by AWS AppSync or Amazon API Gateway and an Amazon DynamoDB database.
+
+Then access your API from your frontend code, for example, in a to-do list app that uses GraphQL:
+
+```javascript
+import { API } from 'aws-amplify';
+import { listTodos } from './graphql/queries';
+
+const result = await API.graphql({
+ query: listTodos
+);
+console.log(result);
+```
+
+Learn more about [Amplify Data.](https://docs.amplify.aws/cli/graphql/overview/)
+
+### Authentication
+
+Amplify Auth makes it easy to add full user authentication flows to your application.
+
+To add backend authentication, you can run the following command:
+
+```javascript
+amplify add auth
+```
+
+You can customize your authentication flow with customized sign-in and registration flows, multi-factor authentication (MFA), and third-party social providers. Amplify deploys an Amazon Cognito instance in your AWS account when you add auth to your app.
+
+Then, you could use the Amplify `Authenticator` component or the client libraries to add user flows.
+
+```javascript
+import { withAuthenticator } from '@aws-amplify/ui-react';
+
+function App({ signOut, user }) {
+ return (
+ <>
+
Hello {user.username}
+
+ >
+ );
+}
+
+export default withAuthenticator(App);
+```
+
+Learn more about [Amplify Auth](https://docs.amplify.aws/lib/auth/getting-started/q/platform/js/).
+
+### Storage
+
+Amplify Storage provides a simple mechanism for managing file and data storage like images, videos, and documents in the cloud.
+
+To add a storage bucket to your app on the backend, run the command:
+
+```javascript
+amplify add storage
+```
+
+Amplify adds an Amazon S3 bucket or Amazon DynamoDB database to your AWS account to store your content.
+
+In your app’s frontend, you can upload files:
+
+```javascript
+import { Storage } from 'aws-amplify';
+
+const result = await Storage.put('example.png', file);
+```
+
+Or retrieve content to display to users:
+
+```javascript
+const image = await Storage.get('example.png');
+```
+
+Learn more about [Amplify Storage](https://docs.amplify.aws/lib/storage/getting-started/q/platform/js/).
+
+### UI building
+
+Amplify makes it easy to quickly build web and mobile app user interfaces using component libraries and Figma-to-code generation.
+
+With the Figma-to-code feature, you can convert Figma designs directly into React components. You can then connect these components to your cloud data in Amplify Studio, and customize them as needed in your code base. This automates the process of coding UIs from design mocks.
+
+Learn more about [Figma-to-code generation](https://docs.amplify.aws/console/uibuilder/figmatocode/).
+
+![Screenshot showing Figma to Code](/images/how-amplify-works/figma-to-code.png)
+
+Amplify also has form-building capabilities to generate React forms with custom theming, validation logic, lifecycle management, and validation.
+
+Learn more about [Form Builder](https://docs.amplify.aws/console/formbuilder/overview/).
+
+![Studio console showing auto-generated forms in the left-hand navigation pane](/images/how-amplify-works/ui-library-form-builder.png)
+
+Amplify includes a library of open-source React components that handle common use cases like authentication, file storage, and data management. These components use AWS services as their backend data sources. For example, the `` component provides a complete authentication flow by connecting to authentication resources.
+
+Learn more about [cloud connected components](https://ui.docs.amplify.aws/react/connected-components/authenticator).
+
+![Amplify’s default sign-in form with email, password, sign-in, and account creation capabilities.](/images/how-amplify-works/ui-library-sign-in.png)
+
+Amplify also offers more than 40 [primitive React components](https://ui.docs.amplify.aws/react/components) built in CSS and React that provide a solid foundation for building your entire app. These primitive components provide the foundational building blocks for constructing custom user interfaces.
+
+![Amplify UI primitive components](/images/how-amplify-works/ui-library-primitive-components.png)
+
+### More!
+
+Amplify provides more beyond its core data, storage, and authentication capabilities. It also offers additional categories including:
+
+- Serverless functions – Add AWS Lambda functions to your projects to add custom business logic to your app.
+- Location services – Add mapping features, geofencing, and location tracking.
+- Analytics – Understand user behavior and track key metrics.
+- AI/ML – Incorporate AI-powered functionality like natural language processing, text-to-speech, and recommendations.
+- PubSub – Pass messages between your app instances and your app's backend to create real-time interactive experiences.
+- Interactions – Create conversational interfaces powered by voice and chatbots.
+- In-app messaging – Send targeted messages to your defined user segments or trigger contextual messages based on user behavior.
+
+## Frontend hosting
+
+Amplify Hosting provides hosting for static and server-side rendered Next.js apps. It has built-in CI/CD workflows, so you can automatically redeploy on every commit. Connect your git branches to Amplify Hosting to automatically deploy both your frontend and backend changes on every push. Enable pull request previews to view new features before merging them into your production branch.
+
+Connect your repository branch:
+
+![Adding a repository through the Amplify Hosting form, including selecting a repository provider and a branch name.](/images/how-amplify-works/hosting-form.png)
+
+Confirm your build settings, add any environmental variables you may need for API keys or parameters, then save and deploy. Amplify will provision a build environment, clone your repository, deploy your Amplify backend if you have one, and then deploy your frontend. All completely managed by Amplify.
+
+![Amplify Hosting displaying a fully deployed site.](/images/how-amplify-works/hosting-deployed-site.png)
+
+Learn more about [Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html).
+
+## Connecting to AWS beyond Amplify
+
+### Connect to existing resources
+
+Amplify is designed to work with your existing AWS resources and configurations. For example, you can use Amplify's pre-built authentication UI components with an existing Amazon Cognito user pool you created and configured separately. Or you can display images and files from an existing S3 bucket in your app's user interface by integrating with Amplify Storage.
+
+Amplify's libraries provide an interface to leverage your existing AWS services so that you can adopt Amplify's capabilities incrementally into your current workflows, without disrupting your existing backend infrastructure.
+
+This flexibility makes it easy to start taking advantage of Amplify frontend capabilities like authentication, APIs, storage, and business logic with your existing resources. Amplify streamlines the integration between UI code, application logic, and backend cloud services.
+
+### Extend with CDK
+
+Amplify provides three override capabilities for customizing your infrastructure beyond the defaults the CLI provides.
+
+- Overrides – Override Amplify-generated infrastructure with additional settings. For example, you could add authentication settings that aren’t directly available in Amplify but are in Amazon Cognito.
+- Custom – Add any AWS service to an Amplify-created backend.
+- Export – Export an Amplify backend to a CDK stack.
+
+Similar to other Amplify actions, you can enable extensibility features by running CLI commands, for example:
+
+```javascript
+amplify override
+```
+
+Learn more about [extensibility](https://docs.amplify.aws/cli/#extensibility).
+
+## Support matrix
+
+Amplify supports the following categories and features across the supported languages:
+
+| | Swift | Android | Flutter | JavaScript |
+| :-- | :-: | :-: | :-: | :-: |
+| Hosting | | | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Figma to Code | | | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Authentication | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| GraphQL API | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Storage | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Functions | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| REST APIs | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Analytics | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Predictions | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| In-app messaging | | | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Push notifications | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| PubSub | | | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+| Geo | ![Checkmark](/images/how-amplify-works/checkmark.png) | ![Checkmark](/images/how-amplify-works/checkmark.png) | | ![Checkmark](/images/how-amplify-works/checkmark.png) |
+
+## Amplify architecture example
+
+The following diagram outlines a few scenarios you could implement with Amplify. It shows the UI, or the data displayed by AWS Amplify; the backend resources provisioned by Amplify; and the underlying AWS services Amplify deploys for you.
+
+![Different Amplify implementations.](/images/how-amplify-works/amplify-scenarios.png)
+
+Amplify grows with your needs, and you can use it in whatever way works best—from a fullstack front-to-back solution, to just frontend hosting or UI components to integrate with your AWS resources.
+
+Now that you understand the core concepts and capabilities of AWS Amplify, it's time to start building! Our step-by-step getting started tutorials walk you through how to configure and integrate Amplify into a new application. These tutorials are available for many popular development platforms and frameworks like React, JavaScript, and Flutter.
+
+
+ Getting started tutorial
+
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index d1b6ee969e8..26dddd29f5e 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,6 +1,6 @@
import { Grid } from 'theme-ui';
import Head from 'next/head';
-import { useEffect } from 'react';
+import { useEffect, useState } from 'react';
import Hero from '../components/Hero';
import LandingHeroCTA from '../components/LandingHeroCTA';
@@ -10,6 +10,8 @@ import FeaturesGrid from '../components/FeaturesGrid';
import LinkBanner from '../components/LinkBanner';
import Footer from '../components/Footer';
import SecondaryNav from '../components/SecondaryNav';
+import { PageContext } from '@/components/Page';
+import { parseLocalStorage } from '@/utils/parseLocalStorage';
import { trackPageVisit } from '../utils/track';
import { NavMenuItem, GlobalNav } from '../components/GlobalNav';
@@ -19,6 +21,7 @@ import {
SOCIAL_LINKS
} from '../utils/globalnav';
import React from 'react';
+import WhatsNewBanner from '../components/WhatsNewBanner';
const meta = {
title: 'Amplify Docs',
@@ -28,12 +31,21 @@ const meta = {
};
const Page = () => {
+ const [isMounted, setIsMounted] = useState(false);
+ const [filterKeys, setFilterKeys] = useState({});
+
+ useEffect(() => {
+ setFilterKeys(parseLocalStorage('filterKeys', {}));
+ }, []);
+
useEffect(() => {
trackPageVisit();
+
+ setIsMounted(true);
}, []);
return (
- <>
+ {meta.title}
@@ -78,7 +90,11 @@ const Page = () => {
socialLinks={SOCIAL_LINKS as NavMenuItem[]}
currentSite={'Docs'}
/>
-
+ {isMounted ? : <>>}
+
Amplify Documentation
@@ -146,7 +162,7 @@ const Page = () => {
- >
+
);
};
diff --git a/src/pages/lib-v1/analytics/autotrack/index.mdx b/src/pages/lib-v1/analytics/autotrack/index.mdx
new file mode 100644
index 00000000000..b944f5e895c
--- /dev/null
+++ b/src/pages/lib-v1/analytics/autotrack/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/autotrack/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/autotrack/q/platform/[platform].mdx
index 4b2a8b6b7a9..39bf288672a 100644
--- a/src/pages/lib-v1/analytics/autotrack/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/autotrack/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Automatically track sessions`,
- description: `The Amplify analytics plugin records when an application opens and closes. This session information can be viewed either from your local computer’s terminal or the AWS Console for Pinpoint.`
+ description: `The Amplify analytics plugin records when an application opens and closes. This session information can be viewed either from your local computer’s terminal or the AWS Console for Pinpoint.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/analytics/enable-disable/index.mdx b/src/pages/lib-v1/analytics/enable-disable/index.mdx
new file mode 100644
index 00000000000..5bd1dae86a1
--- /dev/null
+++ b/src/pages/lib-v1/analytics/enable-disable/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/enable-disable/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/enable-disable/q/platform/[platform].mdx
index dea2fa76031..be1439d7e26 100644
--- a/src/pages/lib-v1/analytics/enable-disable/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/enable-disable/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Enable/Disable Analytics`,
- description: `Learn how to enable/disable analytics using Amplify.`
+ description: `Learn how to enable/disable analytics using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/analytics/escapehatch/index.mdx b/src/pages/lib-v1/analytics/escapehatch/index.mdx
new file mode 100644
index 00000000000..3ef2aa028f2
--- /dev/null
+++ b/src/pages/lib-v1/analytics/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/escapehatch/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/escapehatch/q/platform/[platform].mdx
index 7da72864c48..6819de2d23d 100644
--- a/src/pages/lib-v1/analytics/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/escapehatch/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Escape hatch`,
description: `For advanced use cases where Amplify does not provide the functionality, you can retrieve the escape hatch to access the AWSPinpoint instance.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/analytics/ios/escapehatch.mdx";
+import ios0 from '/src/fragments/lib-v1/analytics/ios/escapehatch.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/analytics/android/escapehatch.mdx";
+import android1 from '/src/fragments/lib-v1/analytics/android/escapehatch.mdx';
-
+
diff --git a/src/pages/lib-v1/analytics/existing-resources/index.mdx b/src/pages/lib-v1/analytics/existing-resources/index.mdx
new file mode 100644
index 00000000000..cfba60335f2
--- /dev/null
+++ b/src/pages/lib-v1/analytics/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/existing-resources/q/platform/[platform].mdx
index 33cbb778775..8c7a8bd0a3e 100644
--- a/src/pages/lib-v1/analytics/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/existing-resources/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use existing AWS resources`,
- description: `Configure the Amplify Libraries to use existing Amazon Pinpoint resources by referencing them in your configuration.`
+ description: `Configure the Amplify Libraries to use existing Amazon Pinpoint resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/analytics/getting-started/index.mdx b/src/pages/lib-v1/analytics/getting-started/index.mdx
new file mode 100644
index 00000000000..3cb23fa2c37
--- /dev/null
+++ b/src/pages/lib-v1/analytics/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/getting-started/q/platform/[platform].mdx
index 13b3b515d75..0546bbb3d3e 100644
--- a/src/pages/lib-v1/analytics/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`
+ description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/analytics/identifyuser/index.mdx b/src/pages/lib-v1/analytics/identifyuser/index.mdx
new file mode 100644
index 00000000000..85753b560f6
--- /dev/null
+++ b/src/pages/lib-v1/analytics/identifyuser/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/identifyuser/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/identifyuser/q/platform/[platform].mdx
index 1846842fd1c..7ddd2ddfef3 100644
--- a/src/pages/lib-v1/analytics/identifyuser/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/identifyuser/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Identify user`,
- description: `Use the Amplify analytics plugin to inform Pinpoint about your users.`
+ description: `Use the Amplify analytics plugin to inform Pinpoint about your users.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib-v1/analytics/record/index.mdx b/src/pages/lib-v1/analytics/record/index.mdx
new file mode 100644
index 00000000000..e3b578cea9a
--- /dev/null
+++ b/src/pages/lib-v1/analytics/record/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/analytics/record/q/platform/[platform].mdx b/src/pages/lib-v1/analytics/record/q/platform/[platform].mdx
index 550079db206..b35c5fc46d6 100644
--- a/src/pages/lib-v1/analytics/record/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/analytics/record/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Record events`,
- description: `Learn how to record analytics events using Amplify.`
+ description: `Learn how to record analytics events using Amplify.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/access_credentials/index.mdx b/src/pages/lib-v1/auth/access_credentials/index.mdx
new file mode 100644
index 00000000000..c53acfad46b
--- /dev/null
+++ b/src/pages/lib-v1/auth/access_credentials/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/access_credentials/q/platform/[platform].mdx b/src/pages/lib-v1/auth/access_credentials/q/platform/[platform].mdx
index 546569d4763..a80eb35f355 100644
--- a/src/pages/lib-v1/auth/access_credentials/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/access_credentials/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Accessing credentials`,
- description: `Use AWS Cognito Auth plugin to access auth credentials`
+ description: `Use AWS Cognito Auth plugin to access auth credentials`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/advanced/index.mdx b/src/pages/lib-v1/auth/advanced/index.mdx
new file mode 100644
index 00000000000..269b0ec504f
--- /dev/null
+++ b/src/pages/lib-v1/auth/advanced/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/advanced/q/platform/[platform].mdx b/src/pages/lib-v1/auth/advanced/q/platform/[platform].mdx
index a99b0f98e92..6e49f2365b3 100644
--- a/src/pages/lib-v1/auth/advanced/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/advanced/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Advanced workflows`,
- description: `Learn more about advanced workflows in the Amplify auth category. This includes subscribing to events, identity pool federation, auth-related Lambda triggers and working with AWS service objects.`
+ description: `Learn more about advanced workflows in the Amplify auth category. This includes subscribing to events, identity pool federation, auth-related Lambda triggers and working with AWS service objects.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
@@ -15,7 +34,7 @@ You can take specific actions when users sign-in or sign-out by subscribing auth
## Lambda Triggers
-The CLI allows you to configure [Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) for your Cognito user pool. These enable you to add custom functionality to your registration and authentication flows. [Read more](/cli/function/function)
+The CLI allows you to configure [Lambda Triggers](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html) for your Cognito user pool. These enable you to add custom functionality to your registration and authentication flows. [Read more](/cli/function)
### Pre Authentication and Pre Sign-up Lambda triggers
diff --git a/src/pages/lib-v1/auth/auth-events/index.mdx b/src/pages/lib-v1/auth/auth-events/index.mdx
new file mode 100644
index 00000000000..d29f6406276
--- /dev/null
+++ b/src/pages/lib-v1/auth/auth-events/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/auth-events/q/platform/[platform].mdx b/src/pages/lib-v1/auth/auth-events/q/platform/[platform].mdx
index 8a11d482f9c..2ed7d20a850 100644
--- a/src/pages/lib-v1/auth/auth-events/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/auth-events/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Auth events`,
- description: `Listen to various auth events`
+ description: `Listen to various auth events`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
AWS Cognito Auth Plugin sends important events through Amplify Hub.
@@ -36,6 +55,12 @@ import { Hub } from 'aws-amplify/utils';
Hub.listen('auth', ({ payload }) => {
switch (payload.event) {
+ case 'signedIn':
+ console.log('user have been signedIn successfully.');
+ break;
+ case 'signedOut':
+ console.log('user have been signedOut successfully.');
+ break;
case 'tokenRefresh':
console.log('auth tokens have been refreshed.');
break;
diff --git a/src/pages/lib-v1/auth/customui/q/platform/[platform].mdx b/src/pages/lib-v1/auth/customui/q/platform/[platform].mdx
deleted file mode 100644
index e7446909025..00000000000
--- a/src/pages/lib-v1/auth/customui/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Customize UI components`,
- description: `Learn how to customize the Amplify auth UI components.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/auth/delete_user/index.mdx b/src/pages/lib-v1/auth/delete_user/index.mdx
new file mode 100644
index 00000000000..3b68987f853
--- /dev/null
+++ b/src/pages/lib-v1/auth/delete_user/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/delete_user/q/platform/[platform].mdx b/src/pages/lib-v1/auth/delete_user/q/platform/[platform].mdx
index 2ea7d7ffbaa..551612215c3 100644
--- a/src/pages/lib-v1/auth/delete_user/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/delete_user/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Delete user`,
- description: `Delete a user`
+ description: `Delete a user`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/device_features/index.mdx b/src/pages/lib-v1/auth/device_features/index.mdx
new file mode 100644
index 00000000000..28b9bcd2e87
--- /dev/null
+++ b/src/pages/lib-v1/auth/device_features/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/device_features/q/platform/[platform].mdx b/src/pages/lib-v1/auth/device_features/q/platform/[platform].mdx
index 128b45e1d6f..92163351863 100644
--- a/src/pages/lib-v1/auth/device_features/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/device_features/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Remember a device`,
- description: `You can use the device related features of Amazon Cognito UserPools by enabling the Devices features. Go to your Cognito UserPool, click on Devices in Left Navigation Menu and chose one of User Opt In or Always.`
+ description: `You can use the device related features of Amazon Cognito UserPools by enabling the Devices features. Go to your Cognito UserPool, click on Devices in Left Navigation Menu and chose one of User Opt In or Always.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/emailpassword/index.mdx b/src/pages/lib-v1/auth/emailpassword/index.mdx
new file mode 100644
index 00000000000..975bf023519
--- /dev/null
+++ b/src/pages/lib-v1/auth/emailpassword/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/emailpassword/q/platform/[platform].mdx b/src/pages/lib-v1/auth/emailpassword/q/platform/[platform].mdx
index b8de450f2ea..a392cc020ab 100644
--- a/src/pages/lib-v1/auth/emailpassword/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/emailpassword/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Enable sign-up, sign-in, and sign-out`,
description: `Learn how to use Amplify's sign up, sign in and sign out APIs.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
@@ -318,3 +337,4 @@ Now that you completed setting up Amplify Auth with username/password you may al
- [Multi-factor authentication](/lib-v1/auth/mfa/q/platform/js/)
+
diff --git a/src/pages/lib-v1/auth/escapehatch/index.mdx b/src/pages/lib-v1/auth/escapehatch/index.mdx
new file mode 100644
index 00000000000..1b043c9e3ea
--- /dev/null
+++ b/src/pages/lib-v1/auth/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/escapehatch/q/platform/[platform].mdx b/src/pages/lib-v1/auth/escapehatch/q/platform/[platform].mdx
index 421e355b9b8..6a041af03a9 100644
--- a/src/pages/lib-v1/auth/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/escapehatch/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Escape hatch`,
description: `Underlying service`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/auth/native_common/escape_hatch/common.mdx";
+import ios0 from '/src/fragments/lib-v1/auth/native_common/escape_hatch/common.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/auth/native_common/escape_hatch/common.mdx";
+import android1 from '/src/fragments/lib-v1/auth/native_common/escape_hatch/common.mdx';
-
+
diff --git a/src/pages/lib-v1/auth/existing-resources/index.mdx b/src/pages/lib-v1/auth/existing-resources/index.mdx
new file mode 100644
index 00000000000..f9726a429d1
--- /dev/null
+++ b/src/pages/lib-v1/auth/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/auth/existing-resources/q/platform/[platform].mdx
index 718c06ec7ec..e7c9760a2a3 100644
--- a/src/pages/lib-v1/auth/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/existing-resources/q/platform/[platform].mdx
@@ -1,24 +1,43 @@
export const meta = {
title: `Use existing Amazon Cognito resources`,
description: `Configure the Amplify Libraries to use existing Amazon Cognito resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android0 from "/src/fragments/lib-v1/auth/existing-resources.mdx";
+import android0 from '/src/fragments/lib-v1/auth/existing-resources.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/auth/existing-resources.mdx";
+import ios1 from '/src/fragments/lib-v1/auth/existing-resources.mdx';
-
+
-import flutter2 from "/src/fragments/lib-v1/auth/existing-resources.mdx";
+import flutter2 from '/src/fragments/lib-v1/auth/existing-resources.mdx';
-
+
diff --git a/src/pages/lib-v1/auth/getting-started/index.mdx b/src/pages/lib-v1/auth/getting-started/index.mdx
new file mode 100644
index 00000000000..e4411ded791
--- /dev/null
+++ b/src/pages/lib-v1/auth/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/auth/getting-started/q/platform/[platform].mdx
index 5db8e5f6c02..b6e74052d9c 100644
--- a/src/pages/lib-v1/auth/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Set up Amplify Auth`,
- description: `Amplify uses Amazon Cognito as the main authentication provider. Learn how to handle user registration, authentication, account recovery & other operations.`
+ description: `Amplify uses Amazon Cognito as the main authentication provider. Learn how to handle user registration, authentication, account recovery & other operations.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/guest_access/index.mdx b/src/pages/lib-v1/auth/guest_access/index.mdx
new file mode 100644
index 00000000000..46d5027117a
--- /dev/null
+++ b/src/pages/lib-v1/auth/guest_access/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/guest_access/q/platform/[platform].mdx b/src/pages/lib-v1/auth/guest_access/q/platform/[platform].mdx
index 04c1e10c088..af96bb69224 100644
--- a/src/pages/lib-v1/auth/guest_access/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/guest_access/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Guest access`,
- description: `Access services without needing to sign in.`
+ description: `Access services without needing to sign in.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/manageusers/index.mdx b/src/pages/lib-v1/auth/manageusers/index.mdx
new file mode 100644
index 00000000000..cdc1489e22d
--- /dev/null
+++ b/src/pages/lib-v1/auth/manageusers/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/manageusers/q/platform/[platform].mdx b/src/pages/lib-v1/auth/manageusers/q/platform/[platform].mdx
index b1e30080344..ecfcac05540 100644
--- a/src/pages/lib-v1/auth/manageusers/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/manageusers/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Password & user management`,
- description: `Learn more about how to handle common password and user management scenarios. E.g. password reset, account recovery etc.`
+ description: `Learn more about how to handle common password and user management scenarios. E.g. password reset, account recovery etc.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
@@ -375,3 +394,4 @@ async function handleConfirmUserAttribute(
+
diff --git a/src/pages/lib-v1/auth/managing_credentials/index.mdx b/src/pages/lib-v1/auth/managing_credentials/index.mdx
new file mode 100644
index 00000000000..d1e8c00472c
--- /dev/null
+++ b/src/pages/lib-v1/auth/managing_credentials/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/managing_credentials/q/platform/[platform].mdx b/src/pages/lib-v1/auth/managing_credentials/q/platform/[platform].mdx
index d699138bb98..37d082c93ab 100644
--- a/src/pages/lib-v1/auth/managing_credentials/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/managing_credentials/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Managing credentials`,
- description: `Learn how to customize credential storage.`
+ description: `Learn how to customize credential storage.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/mfa/index.mdx b/src/pages/lib-v1/auth/mfa/index.mdx
new file mode 100644
index 00000000000..cadd5655746
--- /dev/null
+++ b/src/pages/lib-v1/auth/mfa/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/mfa/q/platform/[platform].mdx b/src/pages/lib-v1/auth/mfa/q/platform/[platform].mdx
index e3135b7882b..84a3f124a7a 100644
--- a/src/pages/lib-v1/auth/mfa/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/mfa/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Multi-factor authentication`,
- description: `Learn how to enable multi-factor authentication with Amplify.`
+ description: `Learn how to enable multi-factor authentication with Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import flows from "/src/fragments/lib-v1/auth/common/mfa/flows.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import flows from '/src/fragments/lib-v1/auth/common/mfa/flows.mdx';
+
+
diff --git a/src/pages/lib-v1/auth/overview/index.mdx b/src/pages/lib-v1/auth/overview/index.mdx
new file mode 100644
index 00000000000..bc7674caaf5
--- /dev/null
+++ b/src/pages/lib-v1/auth/overview/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/overview/q/platform/[platform].mdx b/src/pages/lib-v1/auth/overview/q/platform/[platform].mdx
index 49e66ee0caf..fb14903a9e3 100644
--- a/src/pages/lib-v1/auth/overview/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/overview/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Under the hood`,
- description: `Learn more about the foundational auth concepts for cloud-based application and how they work with Amplify.`
+ description: `Learn more about the foundational auth concepts for cloud-based application and how they work with Amplify.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/password_management/index.mdx b/src/pages/lib-v1/auth/password_management/index.mdx
new file mode 100644
index 00000000000..a280ee18169
--- /dev/null
+++ b/src/pages/lib-v1/auth/password_management/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/password_management/q/platform/[platform].mdx b/src/pages/lib-v1/auth/password_management/q/platform/[platform].mdx
index de34e910913..06a8a169ea9 100644
--- a/src/pages/lib-v1/auth/password_management/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/password_management/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Password management`,
- description: `Use AWS Cognito Auth plugin to update or reset user password`
+ description: `Use AWS Cognito Auth plugin to update or reset user password`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/signOut/index.mdx b/src/pages/lib-v1/auth/signOut/index.mdx
new file mode 100644
index 00000000000..67edd84dea2
--- /dev/null
+++ b/src/pages/lib-v1/auth/signOut/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/signOut/q/platform/[platform].mdx b/src/pages/lib-v1/auth/signOut/q/platform/[platform].mdx
index cecf9e2563b..b698a2a2241 100644
--- a/src/pages/lib-v1/auth/signOut/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/signOut/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Sign out`,
- description: `SignOut a user`
+ description: `SignOut a user`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/signin/index.mdx b/src/pages/lib-v1/auth/signin/index.mdx
new file mode 100644
index 00000000000..ca59e5483e4
--- /dev/null
+++ b/src/pages/lib-v1/auth/signin/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/signin/q/platform/[platform].mdx b/src/pages/lib-v1/auth/signin/q/platform/[platform].mdx
index 2c5c78d6e96..c74c864143c 100644
--- a/src/pages/lib-v1/auth/signin/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/signin/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Sign in`,
- description: `Use AWS Cognito Auth plugin to sign in a user into AWS Cognito User Pool`
+ description: `Use AWS Cognito Auth plugin to sign in a user into AWS Cognito User Pool`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/signin_next_steps/index.mdx b/src/pages/lib-v1/auth/signin_next_steps/index.mdx
new file mode 100644
index 00000000000..b8d8dd903a9
--- /dev/null
+++ b/src/pages/lib-v1/auth/signin_next_steps/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/signin_next_steps/q/platform/[platform].mdx b/src/pages/lib-v1/auth/signin_next_steps/q/platform/[platform].mdx
index 562ee65fbfe..46e8dbb39c9 100644
--- a/src/pages/lib-v1/auth/signin_next_steps/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/signin_next_steps/q/platform/[platform].mdx
@@ -1,16 +1,35 @@
export const meta = {
title: `Sign in next steps`,
description: `Use AWS Cognito Auth plugin to complete a multi step authentication flow`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/auth/native_common/signin_next_steps/common.mdx";
+import ios0 from '/src/fragments/lib-v1/auth/native_common/signin_next_steps/common.mdx';
-
+
-import flutter from "/src/fragments/lib-v1/auth/native_common/signin_next_steps/common.mdx";
+import flutter from '/src/fragments/lib-v1/auth/native_common/signin_next_steps/common.mdx';
-
+
diff --git a/src/pages/lib-v1/auth/signin_web_ui/index.mdx b/src/pages/lib-v1/auth/signin_web_ui/index.mdx
new file mode 100644
index 00000000000..004a3ee7cc6
--- /dev/null
+++ b/src/pages/lib-v1/auth/signin_web_ui/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/signin_web_ui/q/platform/[platform].mdx b/src/pages/lib-v1/auth/signin_web_ui/q/platform/[platform].mdx
index d781d499340..b545b2c9d82 100644
--- a/src/pages/lib-v1/auth/signin_web_ui/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/signin_web_ui/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Sign in with web UI`,
- description: `Use AWS Cognito Auth plugin to register and authenticate a user with a prebuilt web UI`
+ description: `Use AWS Cognito Auth plugin to register and authenticate a user with a prebuilt web UI`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/signin_with_custom_flow/index.mdx b/src/pages/lib-v1/auth/signin_with_custom_flow/index.mdx
new file mode 100644
index 00000000000..7173e5b7fb6
--- /dev/null
+++ b/src/pages/lib-v1/auth/signin_with_custom_flow/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/signin_with_custom_flow/q/platform/[platform].mdx b/src/pages/lib-v1/auth/signin_with_custom_flow/q/platform/[platform].mdx
index ca0975bc9f5..4dea0091850 100644
--- a/src/pages/lib-v1/auth/signin_with_custom_flow/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/signin_with_custom_flow/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Sign in with custom flow`,
- description: `Use AWS Cognito Auth plugin to sign in a user into AWS Cognito User Pool using user defined custom flow`
+ description: `Use AWS Cognito Auth plugin to sign in a user into AWS Cognito User Pool using user defined custom flow`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/sms_flows/index.mdx b/src/pages/lib-v1/auth/sms_flows/index.mdx
new file mode 100644
index 00000000000..1e2e18cff64
--- /dev/null
+++ b/src/pages/lib-v1/auth/sms_flows/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/sms_flows/q/platform/[platform].mdx b/src/pages/lib-v1/auth/sms_flows/q/platform/[platform].mdx
index a076bb67ebe..ca43f13f957 100644
--- a/src/pages/lib-v1/auth/sms_flows/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/sms_flows/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `SMS flows`,
- description: `Using phone numbers for sign-in and verification`
+ description: `Using phone numbers for sign-in and verification`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/social/index.mdx b/src/pages/lib-v1/auth/social/index.mdx
new file mode 100644
index 00000000000..f4844b75963
--- /dev/null
+++ b/src/pages/lib-v1/auth/social/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/social/q/platform/[platform].mdx b/src/pages/lib-v1/auth/social/q/platform/[platform].mdx
index 24a28cb68aa..43dd57bbb29 100644
--- a/src/pages/lib-v1/auth/social/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/social/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Social sign-in (OAuth)`,
- description: `Learn how to setup social sign-in providers like Facebook, Google, Amazon, or Sign in with Apple.`
+ description: `Learn how to setup social sign-in providers like Facebook, Google, Amazon, or Sign in with Apple.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/auth/start/q/platform/[platform].mdx b/src/pages/lib-v1/auth/start/q/platform/[platform].mdx
deleted file mode 100644
index 07468ff6b10..00000000000
--- a/src/pages/lib-v1/auth/start/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Create or re-use existing backend`,
- description: `Learn more about how to create an auth resource or re-use an existing auth backend for Amplify.`,
-};
diff --git a/src/pages/lib-v1/auth/switch-auth/index.mdx b/src/pages/lib-v1/auth/switch-auth/index.mdx
new file mode 100644
index 00000000000..638fad10bf7
--- /dev/null
+++ b/src/pages/lib-v1/auth/switch-auth/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/switch-auth/q/platform/[platform].mdx b/src/pages/lib-v1/auth/switch-auth/q/platform/[platform].mdx
index 05f74b11d34..5f78ee00eff 100644
--- a/src/pages/lib-v1/auth/switch-auth/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/switch-auth/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Switching authentication flows`,
- description: `Learn more about how to switch between different auth flows in Amplify.`
+ description: `Learn more about how to switch between different auth flows in Amplify.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
@@ -60,3 +79,4 @@ For more information about working with Lambda Triggers for custom authenticatio
+
diff --git a/src/pages/lib-v1/auth/user-attributes/index.mdx b/src/pages/lib-v1/auth/user-attributes/index.mdx
new file mode 100644
index 00000000000..95a4c675581
--- /dev/null
+++ b/src/pages/lib-v1/auth/user-attributes/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/auth/user-attributes/q/platform/[platform].mdx b/src/pages/lib-v1/auth/user-attributes/q/platform/[platform].mdx
index 90a65c59b92..eedf691262d 100644
--- a/src/pages/lib-v1/auth/user-attributes/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/auth/user-attributes/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `User attributes`,
- description: `Access and update user attributes`
+ description: `Access and update user attributes`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/advanced-workflows/index.mdx b/src/pages/lib-v1/datastore/advanced-workflows/index.mdx
new file mode 100644
index 00000000000..1e70004f370
--- /dev/null
+++ b/src/pages/lib-v1/datastore/advanced-workflows/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/advanced-workflows/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/advanced-workflows/q/platform/[platform].mdx
index 2aacfda834a..93281ceb75c 100644
--- a/src/pages/lib-v1/datastore/advanced-workflows/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/advanced-workflows/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Advanced workflows`,
- description: `Learn more about advanced workflows in the Amplify DataStore category, including custom primary keys.`
+ description: `Learn more about advanced workflows in the Amplify DataStore category, including custom primary keys.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/auth-model/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/auth-model/q/platform/[platform].mdx
deleted file mode 100644
index 17766c0fa1f..00000000000
--- a/src/pages/lib-v1/datastore/auth-model/q/platform/[platform].mdx
+++ /dev/null
@@ -1,24 +0,0 @@
-export const meta = {
- title: `Models with authorization`,
- description: `Learn more about how DataStore handles Models with finer grain authorization access checks.`,
-};
-
-import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-
-
-
-In order to configure fine grain authorization controls with DataStore, use the `@auth` directive to specify ownership and permissible operations (create, update, delete, read) on a specific type. More information can be found on the @auth directive in the [GraphQL Transformer documentation](/cli/graphql/authorization-rules).
-
-
-
-**Note:** This API is under development and is not released.
-
-
-
-import ios0 from "/src/fragments/lib-v1/datastore/ios/auth-model.mdx";
-
-
-
-import flutter0 from "/src/fragments/lib-v1/datastore/native_common/advanced-workflows.mdx";
-
-
diff --git a/src/pages/lib-v1/datastore/conflict/index.mdx b/src/pages/lib-v1/datastore/conflict/index.mdx
new file mode 100644
index 00000000000..91ab4c40e54
--- /dev/null
+++ b/src/pages/lib-v1/datastore/conflict/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/conflict/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/conflict/q/platform/[platform].mdx
index 0bbb6bc2eba..ef3bd1f71bd 100644
--- a/src/pages/lib-v1/datastore/conflict/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/conflict/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Conflict resolution`,
- description: `Learn more about how conflict resolution in DataStore is managed and how to configure it.`
+ description: `Learn more about how conflict resolution in DataStore is managed and how to configure it.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/data-access/index.mdx b/src/pages/lib-v1/datastore/data-access/index.mdx
new file mode 100644
index 00000000000..bf2cd061bfb
--- /dev/null
+++ b/src/pages/lib-v1/datastore/data-access/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/data-access/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/data-access/q/platform/[platform].mdx
index f239c27fa98..18f5fbb1cb4 100644
--- a/src/pages/lib-v1/datastore/data-access/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/data-access/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Manipulating data`,
- description: `Learn how to save, query, paginate, update, delete and observe data in DataStore.`
+ description: `Learn how to save, query, paginate, update, delete and observe data in DataStore.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/datastore-events/index.mdx b/src/pages/lib-v1/datastore/datastore-events/index.mdx
new file mode 100644
index 00000000000..06e754708d1
--- /dev/null
+++ b/src/pages/lib-v1/datastore/datastore-events/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/datastore-events/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/datastore-events/q/platform/[platform].mdx
index 19c8598b38b..14381b7e795 100644
--- a/src/pages/lib-v1/datastore/datastore-events/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/datastore-events/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `DataStore Events`,
- description: `Listening to DataStore events`
+ description: `Listening to DataStore events`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/examples/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/examples/q/platform/[platform].mdx
deleted file mode 100644
index b9f46f1b958..00000000000
--- a/src/pages/lib-v1/datastore/examples/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Examples`,
- description: `Full examples and resources using Amplify DataStore.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/datastore/getting-started/index.mdx b/src/pages/lib-v1/datastore/getting-started/index.mdx
new file mode 100644
index 00000000000..85f3548841a
--- /dev/null
+++ b/src/pages/lib-v1/datastore/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/getting-started/q/platform/[platform].mdx
index dbdf0eaab4f..57f4802c2f7 100644
--- a/src/pages/lib-v1/datastore/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `Amplify DataStore provides a programming model for leveraging shared and distributed data without writing additional code for offline and online scenarios, which makes working with distributed, cross-user data just as simple as working with local-only data.`
+ description: `Amplify DataStore provides a programming model for leveraging shared and distributed data without writing additional code for offline and online scenarios, which makes working with distributed, cross-user data just as simple as working with local-only data.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/how-it-works/index.mdx b/src/pages/lib-v1/datastore/how-it-works/index.mdx
new file mode 100644
index 00000000000..49a497771fa
--- /dev/null
+++ b/src/pages/lib-v1/datastore/how-it-works/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/how-it-works/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/how-it-works/q/platform/[platform].mdx
index 80b7e29e625..d71bf388940 100644
--- a/src/pages/lib-v1/datastore/how-it-works/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/how-it-works/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `How it works`,
- description: `Amplify DataStore provides a persistent on-device storage repository for you to write, read, and observe changes to data if you are online or offline, and seamlessly sync to the cloud as well as across devices. Learn more about how it works.`
+ description: `Amplify DataStore provides a persistent on-device storage repository for you to write, read, and observe changes to data if you are online or offline, and seamlessly sync to the cloud as well as across devices. Learn more about how it works.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/other-methods/index.mdx b/src/pages/lib-v1/datastore/other-methods/index.mdx
new file mode 100644
index 00000000000..22b05ab947a
--- /dev/null
+++ b/src/pages/lib-v1/datastore/other-methods/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/other-methods/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/other-methods/q/platform/[platform].mdx
index 2930e39b4a7..7867d927c53 100644
--- a/src/pages/lib-v1/datastore/other-methods/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/other-methods/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Other methods`,
- description: `Other Amplify DataStore methods`
+ description: `Other Amplify DataStore methods`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/real-time/index.mdx b/src/pages/lib-v1/datastore/real-time/index.mdx
new file mode 100644
index 00000000000..2fca5e0ec3c
--- /dev/null
+++ b/src/pages/lib-v1/datastore/real-time/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/real-time/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/real-time/q/platform/[platform].mdx
index a60b0813c7d..e1c9c7bfb80 100644
--- a/src/pages/lib-v1/datastore/real-time/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/real-time/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Real time`,
- description: `Learn more about how DataStore handles data changes in real-time.`
+ description: `Learn more about how DataStore handles data changes in real-time.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/relational/index.mdx b/src/pages/lib-v1/datastore/relational/index.mdx
new file mode 100644
index 00000000000..d21ba37cf3e
--- /dev/null
+++ b/src/pages/lib-v1/datastore/relational/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/relational/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/relational/q/platform/[platform].mdx
index c4ac34f3bca..d09a4d5dc8e 100644
--- a/src/pages/lib-v1/datastore/relational/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/relational/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Relational models`,
- description: `Learn more about how DataStore handles relationships between Models, such as "has one", "has many", "belongs to".`
+ description: `Learn more about how DataStore handles relationships between Models, such as "has one", "has many", "belongs to".`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/schema-updates/index.mdx b/src/pages/lib-v1/datastore/schema-updates/index.mdx
new file mode 100644
index 00000000000..9e49494fd7f
--- /dev/null
+++ b/src/pages/lib-v1/datastore/schema-updates/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/schema-updates/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/schema-updates/q/platform/[platform].mdx
index e529cfc21ea..ffd1dd17359 100644
--- a/src/pages/lib-v1/datastore/schema-updates/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/schema-updates/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Schema updates`,
- description: `Learn more about how to issue schema updates for DataStore`
+ description: `Learn more about how to issue schema updates for DataStore`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/setup-auth-rules/index.mdx b/src/pages/lib-v1/datastore/setup-auth-rules/index.mdx
new file mode 100644
index 00000000000..c3cff6d6808
--- /dev/null
+++ b/src/pages/lib-v1/datastore/setup-auth-rules/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/setup-auth-rules/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/setup-auth-rules/q/platform/[platform].mdx
index 2d9377255d1..e958fc910c3 100644
--- a/src/pages/lib-v1/datastore/setup-auth-rules/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/setup-auth-rules/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Setup authorization rules`,
- description: `Learn how to apply authorization rules to your models with the @auth directive`
+ description: `Learn how to apply authorization rules to your models with the @auth directive`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/datastore/sync/index.mdx b/src/pages/lib-v1/datastore/sync/index.mdx
new file mode 100644
index 00000000000..6f2257cf63e
--- /dev/null
+++ b/src/pages/lib-v1/datastore/sync/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/datastore/sync/q/platform/[platform].mdx b/src/pages/lib-v1/datastore/sync/q/platform/[platform].mdx
index 865b92ba627..ef6cf5e010b 100644
--- a/src/pages/lib-v1/datastore/sync/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/datastore/sync/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Syncing data to cloud`,
- description: `Learn more about how DataStore connects to an AppSync backend and automatically syncs all locally saved data using GraphQL.`
+ description: `Learn more about how DataStore connects to an AppSync backend and automatically syncs all locally saved data using GraphQL.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/debugging/dev-menu/index.mdx b/src/pages/lib-v1/debugging/dev-menu/index.mdx
new file mode 100644
index 00000000000..cf231a2cbeb
--- /dev/null
+++ b/src/pages/lib-v1/debugging/dev-menu/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/debugging/dev-menu/q/platform/[platform].mdx b/src/pages/lib-v1/debugging/dev-menu/q/platform/[platform].mdx
index e4afb5b978d..8e942bcc931 100644
--- a/src/pages/lib-v1/debugging/dev-menu/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/debugging/dev-menu/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Developer Menu`,
description: `Amplify developer menu helps you quickly file GitHub issues with critical information (environment and device information) automatically added to the issue description. Learn how to setup, activate, and use the developer menu.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/debugging/native_common/dev-menu/common.mdx";
+import ios0 from '/src/fragments/lib-v1/debugging/native_common/dev-menu/common.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/debugging/native_common/dev-menu/common.mdx";
+import android1 from '/src/fragments/lib-v1/debugging/native_common/dev-menu/common.mdx';
-
\ No newline at end of file
+
diff --git a/src/pages/lib-v1/geo/escapehatch/index.mdx b/src/pages/lib-v1/geo/escapehatch/index.mdx
new file mode 100644
index 00000000000..f10e87f8cf4
--- /dev/null
+++ b/src/pages/lib-v1/geo/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/geo/escapehatch/q/platform/[platform].mdx b/src/pages/lib-v1/geo/escapehatch/q/platform/[platform].mdx
index d3fec5a09ed..d26101d7e5d 100644
--- a/src/pages/lib-v1/geo/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/geo/escapehatch/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Escape hatch`,
description: `For specialized use cases where Amplify does not provide the functionality, you can use the escape hatch to access a low-level client instance for Amazon Location Service.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/geo/android/escapehatch.mdx";
+import android1 from '/src/fragments/lib-v1/geo/android/escapehatch.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios2 from "/src/fragments/lib-v1/geo/ios/escapehatch.mdx";
+import ios2 from '/src/fragments/lib-v1/geo/ios/escapehatch.mdx';
-
\ No newline at end of file
+
diff --git a/src/pages/lib-v1/geo/existing-resources/index.mdx b/src/pages/lib-v1/geo/existing-resources/index.mdx
new file mode 100644
index 00000000000..4105edee88d
--- /dev/null
+++ b/src/pages/lib-v1/geo/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/geo/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/geo/existing-resources/q/platform/[platform].mdx
index 9a54cf1396a..2e76fcac3f2 100644
--- a/src/pages/lib-v1/geo/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/geo/existing-resources/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Use existing Amazon Location Service resources`,
description: `Configure Amplify Geo to use existing Amazon Location Service resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/geo/existing-resources.mdx";
+import android1 from '/src/fragments/lib-v1/geo/existing-resources.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios2 from "/src/fragments/lib-v1/geo/existing-resources.mdx";
+import ios2 from '/src/fragments/lib-v1/geo/existing-resources.mdx';
-
+
diff --git a/src/pages/lib-v1/geo/geofences/q/platform/[platform].mdx b/src/pages/lib-v1/geo/geofences/q/platform/[platform].mdx
deleted file mode 100644
index 0ab587f6f6a..00000000000
--- a/src/pages/lib-v1/geo/geofences/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Geofences`,
- description: `The Amplify Geo category`
-};
diff --git a/src/pages/lib-v1/geo/getting-started/index.mdx b/src/pages/lib-v1/geo/getting-started/index.mdx
new file mode 100644
index 00000000000..6b0a40f31fd
--- /dev/null
+++ b/src/pages/lib-v1/geo/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/geo/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/geo/getting-started/q/platform/[platform].mdx
index 8086dcd10a2..53620991520 100644
--- a/src/pages/lib-v1/geo/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/geo/getting-started/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Getting started`,
description: `AWS Amplify Geo module provides a simple way to get map data, search for places, and reverse geocoding.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/geo/native_common/getting_started/common.mdx";
+import android1 from '/src/fragments/lib-v1/geo/native_common/getting_started/common.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios2 from "/src/fragments/lib-v1/geo/native_common/getting_started/common.mdx";
+import ios2 from '/src/fragments/lib-v1/geo/native_common/getting_started/common.mdx';
-
+
diff --git a/src/pages/lib-v1/geo/google-migration/q/platform/[platform].mdx b/src/pages/lib-v1/geo/google-migration/q/platform/[platform].mdx
deleted file mode 100644
index bb6bf18c4bc..00000000000
--- a/src/pages/lib-v1/geo/google-migration/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Migrating from Google Maps`,
- description: `Migrate applications from Google Maps to Amplify Geo`
-};
diff --git a/src/pages/lib-v1/geo/maps/index.mdx b/src/pages/lib-v1/geo/maps/index.mdx
new file mode 100644
index 00000000000..9fd2f379602
--- /dev/null
+++ b/src/pages/lib-v1/geo/maps/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/geo/maps/q/platform/[platform].mdx b/src/pages/lib-v1/geo/maps/q/platform/[platform].mdx
index 243e04210fe..49286ad71b5 100644
--- a/src/pages/lib-v1/geo/maps/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/geo/maps/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Maps`,
description: `The Amplify Geo category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/geo/native_common/maps/common.mdx";
+import android1 from '/src/fragments/lib-v1/geo/native_common/maps/common.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios2 from "/src/fragments/lib-v1/geo/native_common/maps/common.mdx";
+import ios2 from '/src/fragments/lib-v1/geo/native_common/maps/common.mdx';
-
+
diff --git a/src/pages/lib-v1/geo/search/index.mdx b/src/pages/lib-v1/geo/search/index.mdx
new file mode 100644
index 00000000000..ea7359d5286
--- /dev/null
+++ b/src/pages/lib-v1/geo/search/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/geo/search/q/platform/[platform].mdx b/src/pages/lib-v1/geo/search/q/platform/[platform].mdx
index e6e9bb616f1..86216910898 100644
--- a/src/pages/lib-v1/geo/search/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/geo/search/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Location Search`,
description: `The Amplify Geo category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/geo/native_common/search/common.mdx";
+import android1 from '/src/fragments/lib-v1/geo/native_common/search/common.mdx';
-
+
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios2 from "/src/fragments/lib-v1/geo/native_common/search/common.mdx";
+import ios2 from '/src/fragments/lib-v1/geo/native_common/search/common.mdx';
-
+
diff --git a/src/pages/lib-v1/graphqlapi/advanced-workflows/index.mdx b/src/pages/lib-v1/graphqlapi/advanced-workflows/index.mdx
new file mode 100644
index 00000000000..96eb294261c
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/advanced-workflows/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/advanced-workflows/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/advanced-workflows/q/platform/[platform].mdx
index 8f980d5057c..52504aea1c3 100644
--- a/src/pages/lib-v1/graphqlapi/advanced-workflows/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/advanced-workflows/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Advanced Workflows`,
- description: `Learn more about advanced workflows in Amplify's API category`
+ description: `Learn more about advanced workflows in Amplify's API category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/authz/index.mdx b/src/pages/lib-v1/graphqlapi/authz/index.mdx
new file mode 100644
index 00000000000..990fbe46310
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/authz/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/authz/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/authz/q/platform/[platform].mdx
index 2a2d6cf7a90..b38a1cc6563 100644
--- a/src/pages/lib-v1/graphqlapi/authz/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/authz/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Configure authorization modes`,
- description: `Learn more about how to configure authorization modes in Amplify's API category`
+ description: `Learn more about how to configure authorization modes in Amplify's API category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/cancel-request/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/cancel-request/q/platform/[platform].mdx
deleted file mode 100644
index 93971bf199c..00000000000
--- a/src/pages/lib-v1/graphqlapi/cancel-request/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Cancel API requests`,
- description: `Learn more about how to cancel query or mutation requests with Amplify's GraphQL API category`,
-};
diff --git a/src/pages/lib-v1/graphqlapi/concepts/index.mdx b/src/pages/lib-v1/graphqlapi/concepts/index.mdx
new file mode 100644
index 00000000000..ded856e32a1
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/concepts/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/concepts/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/concepts/q/platform/[platform].mdx
index 025a7de4001..57651d8676f 100644
--- a/src/pages/lib-v1/graphqlapi/concepts/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/concepts/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Concepts`,
- description: `Learn more about the foundation concepts of Amplify's API category.`
+ description: `Learn more about the foundation concepts of Amplify's API category.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/create-or-re-use-existing-backend/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/create-or-re-use-existing-backend/q/platform/[platform].mdx
deleted file mode 100644
index 659ba09a1b2..00000000000
--- a/src/pages/lib-v1/graphqlapi/create-or-re-use-existing-backend/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Create or re-use existing backend`,
- description: `Learn more about how to create or re-use an existing API backend resource in Amplify.`,
-};
diff --git a/src/pages/lib-v1/graphqlapi/existing-resources/index.mdx b/src/pages/lib-v1/graphqlapi/existing-resources/index.mdx
new file mode 100644
index 00000000000..042746647e1
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/existing-resources/q/platform/[platform].mdx
index 441570a15a1..ec8eaff7b7f 100644
--- a/src/pages/lib-v1/graphqlapi/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/existing-resources/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use existing AWS resources`,
- description: `Configure the Amplify Libraries to use existing AWS AppSync resources by referencing them in your configuration.`
+ description: `Configure the Amplify Libraries to use existing AWS AppSync resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/getting-started/index.mdx b/src/pages/lib-v1/graphqlapi/getting-started/index.mdx
new file mode 100644
index 00000000000..3cd362bbe1d
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/getting-started/q/platform/[platform].mdx
index 7f56f73801e..a85fbc769e8 100644
--- a/src/pages/lib-v1/graphqlapi/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `Learn more about how to get started with Amplify's API category`
+ description: `Learn more about how to get started with Amplify's API category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/graphql-from-nodejs/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/graphql-from-nodejs/q/platform/[platform].mdx
deleted file mode 100644
index c72fb115f56..00000000000
--- a/src/pages/lib-v1/graphqlapi/graphql-from-nodejs/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `GraphQL from NodeJS`,
- description: `Learn more about how to call an AppSync GraphQL API from a NodeJS app or a Lambda function`,
-};
diff --git a/src/pages/lib-v1/graphqlapi/mutate-data/index.mdx b/src/pages/lib-v1/graphqlapi/mutate-data/index.mdx
new file mode 100644
index 00000000000..90f64463823
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/mutate-data/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/mutate-data/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/mutate-data/q/platform/[platform].mdx
index 2ad17196af5..6cf4e302abb 100644
--- a/src/pages/lib-v1/graphqlapi/mutate-data/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/mutate-data/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Create, update, delete data`,
- description: `Learn more about how to create and update data using GraphQL APIs in Amplify`
+ description: `Learn more about how to create and update data using GraphQL APIs in Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/offline/index.mdx b/src/pages/lib-v1/graphqlapi/offline/index.mdx
new file mode 100644
index 00000000000..e950729e668
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/offline/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/offline/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/offline/q/platform/[platform].mdx
index 918394333c3..f47324bd4c1 100644
--- a/src/pages/lib-v1/graphqlapi/offline/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/offline/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Offline scenarios`,
- description: `Learn more about how to support offline scenarios with Amplify's GraphQL API category`
+ description: `Learn more about how to support offline scenarios with Amplify's GraphQL API category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/query-data/index.mdx b/src/pages/lib-v1/graphqlapi/query-data/index.mdx
new file mode 100644
index 00000000000..76a95119bc9
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/query-data/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/query-data/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/query-data/q/platform/[platform].mdx
index 51785ad0c36..d52faa28187 100644
--- a/src/pages/lib-v1/graphqlapi/query-data/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/query-data/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Fetch data`,
- description: `Learn more about how to fetch data using Amplify's GraphQL API category`
+ description: `Learn more about how to fetch data using Amplify's GraphQL API category`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/graphqlapi/subscribe-data/index.mdx b/src/pages/lib-v1/graphqlapi/subscribe-data/index.mdx
new file mode 100644
index 00000000000..2a45c0ba2f9
--- /dev/null
+++ b/src/pages/lib-v1/graphqlapi/subscribe-data/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/graphqlapi/subscribe-data/q/platform/[platform].mdx b/src/pages/lib-v1/graphqlapi/subscribe-data/q/platform/[platform].mdx
index 6bd7489e0df..38b36ec2d0e 100644
--- a/src/pages/lib-v1/graphqlapi/subscribe-data/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/graphqlapi/subscribe-data/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Subscribe to data`,
- description: `Learn more about how to observe to data changes using subscriptions in Amplify.`
+ description: `Learn more about how to observe to data changes using subscriptions in Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/index.mdx b/src/pages/lib-v1/index.mdx
new file mode 100644
index 00000000000..6db8b6eb3fb
--- /dev/null
+++ b/src/pages/lib-v1/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { PLATFORM_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/info/app-uninstall/index.mdx b/src/pages/lib-v1/info/app-uninstall/index.mdx
new file mode 100644
index 00000000000..1cb584fb3ec
--- /dev/null
+++ b/src/pages/lib-v1/info/app-uninstall/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/info/app-uninstall/q/platform/[platform].mdx b/src/pages/lib-v1/info/app-uninstall/q/platform/[platform].mdx
index 184f6e51080..917a5d61a1b 100644
--- a/src/pages/lib-v1/info/app-uninstall/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/info/app-uninstall/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Uninstalling the app`,
description: `Learn about the data that gets stored persistently on a device.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/info/native_common/app-uninstall/common.mdx";
+import ios0 from '/src/fragments/lib-v1/info/native_common/app-uninstall/common.mdx';
-
+
diff --git a/src/pages/lib-v1/info/overview/index.mdx b/src/pages/lib-v1/info/overview/index.mdx
new file mode 100644
index 00000000000..fcc07a829a8
--- /dev/null
+++ b/src/pages/lib-v1/info/overview/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/info/overview/q/platform/[platform].mdx b/src/pages/lib-v1/info/overview/q/platform/[platform].mdx
index c8395747263..b8625f3d28a 100644
--- a/src/pages/lib-v1/info/overview/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/info/overview/q/platform/[platform].mdx
@@ -1,16 +1,35 @@
export const meta = {
title: `Data Information`,
description: `Information regarding the data collected by the library`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/info/native_common/data-information/common.mdx";
+import ios0 from '/src/fragments/lib-v1/info/native_common/data-information/common.mdx';
-
+
-import ios1 from "/src/fragments/lib-v1/info/native_common/app-uninstall/common.mdx";
+import ios1 from '/src/fragments/lib-v1/info/native_common/app-uninstall/common.mdx';
-
+
diff --git a/src/pages/lib-v1/interactions/chatbot/q/platform/[platform].mdx b/src/pages/lib-v1/interactions/chatbot/q/platform/[platform].mdx
deleted file mode 100644
index 9692f17382b..00000000000
--- a/src/pages/lib-v1/interactions/chatbot/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Interact with bots`,
- description: `Learn more about how to integrate chat bot interactions into your application using Amplify.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/predictions/escapehatch/index.mdx b/src/pages/lib-v1/predictions/escapehatch/index.mdx
new file mode 100644
index 00000000000..edc8d993016
--- /dev/null
+++ b/src/pages/lib-v1/predictions/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/escapehatch/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/escapehatch/q/platform/[platform].mdx
index e4c50613811..0b0e45ec9ec 100644
--- a/src/pages/lib-v1/predictions/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/escapehatch/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Escape hatch`,
description: `For any of the AWS services behind predictions, you can use the SDK object to get access to any methods we are not calling on your behalf by using an escape hatch.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/predictions/ios/escapehatch.mdx";
+import ios0 from '/src/fragments/lib-v1/predictions/ios/escapehatch.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/predictions/android/escapehatch.mdx";
+import android1 from '/src/fragments/lib-v1/predictions/android/escapehatch.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/getting-started/index.mdx b/src/pages/lib-v1/predictions/getting-started/index.mdx
new file mode 100644
index 00000000000..bc235b3d824
--- /dev/null
+++ b/src/pages/lib-v1/predictions/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/getting-started/q/platform/[platform].mdx
index 6d3a03c24e1..aeee589c128 100644
--- a/src/pages/lib-v1/predictions/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/getting-started/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Getting started`,
description: `Get started with integrating ML capabilities into your application using Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/native_common/getting-started/common.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/native_common/getting-started/common.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/native_common/getting-started/common.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/native_common/getting-started/common.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/identify-entity/index.mdx b/src/pages/lib-v1/predictions/identify-entity/index.mdx
new file mode 100644
index 00000000000..a08155a1ae3
--- /dev/null
+++ b/src/pages/lib-v1/predictions/identify-entity/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/identify-entity/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/identify-entity/q/platform/[platform].mdx
index 5e3b3cd9ac4..fdcce447494 100644
--- a/src/pages/lib-v1/predictions/identify-entity/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/identify-entity/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Identify entities from images`,
description: `Learn more about how to identify entities from an image using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/identify-entity.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/identify-entity.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/identify-entity.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/identify-entity.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/identify-text/index.mdx b/src/pages/lib-v1/predictions/identify-text/index.mdx
new file mode 100644
index 00000000000..73894e08bad
--- /dev/null
+++ b/src/pages/lib-v1/predictions/identify-text/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/identify-text/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/identify-text/q/platform/[platform].mdx
index 978e812a4c6..8637d0f8998 100644
--- a/src/pages/lib-v1/predictions/identify-text/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/identify-text/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Identify text`,
description: `Learn more about how to identify text from images and documents in your application using AWS Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/identify-text.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/identify-text.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/identify-text.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/identify-text.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/interpret/index.mdx b/src/pages/lib-v1/predictions/interpret/index.mdx
new file mode 100644
index 00000000000..05b40415205
--- /dev/null
+++ b/src/pages/lib-v1/predictions/interpret/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/interpret/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/interpret/q/platform/[platform].mdx
index 631d88315b9..88f09645e53 100644
--- a/src/pages/lib-v1/predictions/interpret/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/interpret/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Interpret sentiment`,
description: `Learn more about how to determine key phrases, sentiment, language, syntax, and entities from text using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/interpret.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/interpret.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/interpret.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/interpret.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/intro/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/intro/q/platform/[platform].mdx
deleted file mode 100644
index f4041b8ea28..00000000000
--- a/src/pages/lib-v1/predictions/intro/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Overview`,
- description: `The Predictions category enables you to integrate machine learning in your application without any prior machine learning experience. The Predictions category comes with built-in support for both online and offline use cases.`,
-};
diff --git a/src/pages/lib-v1/predictions/label-image/index.mdx b/src/pages/lib-v1/predictions/label-image/index.mdx
new file mode 100644
index 00000000000..e77f65b4446
--- /dev/null
+++ b/src/pages/lib-v1/predictions/label-image/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/label-image/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/label-image/q/platform/[platform].mdx
index 0988b3cfe0a..405d5463e17 100644
--- a/src/pages/lib-v1/predictions/label-image/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/label-image/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Label objects in image`,
description: `Learn more about how to detect labels in an image using Amplify. For example you can detect if an image has objects such as chairs, desks etc.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/label-image.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/label-image.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/label-image.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/label-image.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/sample/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/sample/q/platform/[platform].mdx
deleted file mode 100644
index 2808d193af4..00000000000
--- a/src/pages/lib-v1/predictions/sample/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Example`,
- description: `Sample code for Amplify's predictions category`,
-};
diff --git a/src/pages/lib-v1/predictions/text-speech/index.mdx b/src/pages/lib-v1/predictions/text-speech/index.mdx
new file mode 100644
index 00000000000..cebf0e56d6b
--- /dev/null
+++ b/src/pages/lib-v1/predictions/text-speech/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/text-speech/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/text-speech/q/platform/[platform].mdx
index caae3991e02..15820468684 100644
--- a/src/pages/lib-v1/predictions/text-speech/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/text-speech/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Text to speech`,
description: `Learn more about how to integrate text-to-speech capabilities into your application using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/text-speech.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/text-speech.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/text-speech.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/text-speech.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/transcribe/index.mdx b/src/pages/lib-v1/predictions/transcribe/index.mdx
new file mode 100644
index 00000000000..de36fee1566
--- /dev/null
+++ b/src/pages/lib-v1/predictions/transcribe/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/transcribe/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/transcribe/q/platform/[platform].mdx
index 73fd0d0b83e..4841485182d 100644
--- a/src/pages/lib-v1/predictions/transcribe/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/transcribe/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Transcribe audio to text`,
description: `Learn more about how to transcribe audio to text (also known as speech-to-text) for your application using Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/transcribe.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/transcribe.mdx';
-
+
diff --git a/src/pages/lib-v1/predictions/translate/index.mdx b/src/pages/lib-v1/predictions/translate/index.mdx
new file mode 100644
index 00000000000..26d86027c67
--- /dev/null
+++ b/src/pages/lib-v1/predictions/translate/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/predictions/translate/q/platform/[platform].mdx b/src/pages/lib-v1/predictions/translate/q/platform/[platform].mdx
index def89c37cbe..0bd0f778b4d 100644
--- a/src/pages/lib-v1/predictions/translate/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/predictions/translate/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Translate language`,
description: `Learn more about how to integrate translation capabilities for your application using Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios1 from "/src/fragments/lib-v1/predictions/ios/translate.mdx";
+import ios1 from '/src/fragments/lib-v1/predictions/ios/translate.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android2 from "/src/fragments/lib-v1/predictions/android/translate.mdx";
+import android2 from '/src/fragments/lib-v1/predictions/android/translate.mdx';
-
+
diff --git a/src/pages/lib-v1/project-setup/async/index.mdx b/src/pages/lib-v1/project-setup/async/index.mdx
new file mode 100644
index 00000000000..e0fe9e67e3f
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/async/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/async/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/async/q/platform/[platform].mdx
index caca6de1c48..289b0367ac8 100644
--- a/src/pages/lib-v1/project-setup/async/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/async/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Async Programming Model`,
description: `Amplify Android uses an asynchronous programming model`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android0 from "/src/fragments/lib-v1/project-setup/android/async/async.mdx";
+import android0 from '/src/fragments/lib-v1/project-setup/android/async/async.mdx';
-
+
diff --git a/src/pages/lib-v1/project-setup/combine/index.mdx b/src/pages/lib-v1/project-setup/combine/index.mdx
new file mode 100644
index 00000000000..29f52bfa896
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/combine/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/combine/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/combine/q/platform/[platform].mdx
index 0e76549274b..d52e15a8d54 100644
--- a/src/pages/lib-v1/project-setup/combine/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/combine/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Using Combine with Amplify`,
description: `Amplify's support for Apple's Combine framework`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/project-setup/ios/combine/combine.mdx";
+import ios0 from '/src/fragments/lib-v1/project-setup/ios/combine/combine.mdx';
-
\ No newline at end of file
+
diff --git a/src/pages/lib-v1/project-setup/coroutines/index.mdx b/src/pages/lib-v1/project-setup/coroutines/index.mdx
new file mode 100644
index 00000000000..c8be9be5b6b
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/coroutines/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/coroutines/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/coroutines/q/platform/[platform].mdx
index 02e9151c6a6..064933fcf8e 100644
--- a/src/pages/lib-v1/project-setup/coroutines/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/coroutines/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Kotlin Coroutines Support`,
description: `Amplify Android includes first-class support for Kotlin Coroutines and Flows.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android0 from "/src/fragments/lib-v1/project-setup/android/coroutines/coroutines.mdx";
+import android0 from '/src/fragments/lib-v1/project-setup/android/coroutines/coroutines.mdx';
-
+
diff --git a/src/pages/lib-v1/project-setup/create-application/index.mdx b/src/pages/lib-v1/project-setup/create-application/index.mdx
new file mode 100644
index 00000000000..cea0ee06d76
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/create-application/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx
index 9b268c03f0e..f85ecdd1f2a 100644
--- a/src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/create-application/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Create your application`,
- description: `Project setup for Amplify prior to adding category specific example.`
+ description: `Project setup for Amplify prior to adding category specific example.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
@@ -29,37 +48,247 @@ import flutter2 from '/src/fragments/lib-v1/project-setup/native_common/create-a
-import js0 from '/src/fragments/lib-v1/start/getting-started/angular/setup.mdx';
-import js2 from '/src/fragments/lib-v1/start/getting-started/react/setup.mdx';
-import js3 from '/src/fragments/lib-v1/start/getting-started/vue/setup.mdx';
-import js5 from '/src/fragments/lib-v1/start/getting-started/next/setup.mdx';
-
-
+import versionRangeCallout from '/src/fragments/lib-v1/ssr/nextjs/version-range-callout.mdx';
+
+
+
+To set up the project, you will need to create a new Next.js app with the
+[`create-next-app`](https://nextjs.org/docs/api-reference/create-next-app) tool.
+You'll then add Amplify and initialize a new project.
+
+Run the following command and following the instructions to create a Next.js app.
+
+```shellscript
+npx create-next-app@latest next-amplified
+```
+
+Then run the following command to enter the root of your Next.js app.
+
+```shellscript
+cd next-amplified
+```
+
+You can now run the app in development mode by using the following command:
+
+```bash
+npm run dev
+```
-
+Use the [Angular CLI](https://github.com/angular/angular-cli) to bootstrap a new Angular app:
+
+```bash
+npx -p @angular/cli ng new amplify-app
+
+? Would you like to add Angular routing? Y
+? Which stylesheet format would you like to use? (your preferred stylesheet provider)
+
+cd amplify-app
+```
+
+
+
+
+
+First, create `src/polyfills.ts` and add the following:
+
+```javascript
+(window as any).global = window;
+(window as any).process = {
+ env: { DEBUG: undefined },
+};
+```
+
+Then, open your `angular.json` file, and add `src/polyfills.ts` to polyfills array(s) in your `angular.json`. These arrays are located in projects.`.architect..options`.
+
+```javascript
+"polyfills": [
+ "zone.js",
+ "src/polyfills.ts"
+],
+```
+
+And finally, make sure to add `src/polyfills` to files in your `tsconfig.app.json`:
+
+```javascript
+{
+ "files": [
+ "src/main.ts",
+ "src/polyfills.ts"
+ ],
+}
+```
+
+
+
+
+Add the following to your `src/polyfills.ts` file to recreate them:
+
+```javascript
+(window as any).global = window;
+(window as any).process = {
+ env: { DEBUG: undefined },
+};
+```
+
+
+
+
-
+To get started, first create a new React app using Vite, and then install and use the Amplify CLI to start adding backend capabilities to your app.
+
+From your projects directory, run the following commands and follow the prompts:
+
+```bash
+npm create vite@latest
+```
+This creates a new React app in a new directory. Navigate to your new directory and run the app by using the following command:
+
+```bash
+cd
+```
+
+Then, install your dependencies and run the development server by running the following command:
+
+```bash
+npm install
+npm run dev
+```
+
+This runs a development server and see preview your app locally.
-
+Use the Vue Vite powered `create-app` to bootstrap a new Vue 3 app (select required configuration, selecting the defaults as an example for this project):
+
+```bash
+npm init vue@3
+
+Need to install the following packages:
+ create-vue@3
+Ok to proceed? (y) y
+
+✔ Project name: … myamplifyproject
+✔ Add TypeScript? … No
+✔ Add JSX Support? … No
+✔ Add Vue Router for Single Page Application development? … No
+✔ Add Pinia for state management? … No
+✔ Add Vitest for Unit Testing? … No
+✔ Add Cypress for both Unit and End-to-End testing? … No
+✔ Add ESLint for code quality? … No
+```
+
+This creates a new Vue app in a new directory. Navigate to your new directory and run the app by using the following command:
+
+```bash
+cd
+```
+
+Then, install your dependencies and run the development server by running the following command:
+
+```bash
+npm install
+npm run dev
+```
+
+This runs a development server and see preview your app locally.
+## Create a New Amplify Backend
+
+Now that you have a running app, it's time to set up Amplify so that you
+can set up the backend services you need.
+
+
+
+Please ensure the Amplify CLI version in
+your system is higher than `12.5.1`. You can check the CLI version by
+running `amplify --version`.
+
+
+
+Open a new terminal. From the root of the project, run:
+
+```bash
+amplify init
+```
+
+When you initialize Amplify you'll be prompted for some information about the app.
+
+```console
+? Enter a name for the project (nextamplified)
+The following configuration will be applied:
+
+Project information
+| Name: nextamplified
+| Environment: dev
+| Default editor: Visual Studio Code
+| App type: javascript
+| Javascript framework:
+| Source Directory Path: src
+| Distribution Directory Path: build
+| Build Command: npm run-script build
+| Start Command: npm run-script start
+
+? Initialize the project with the above configuration? Yes
+Using default provider awscloudformation
+? Select the authentication method you want to use: AWS profile
+
+For more information on AWS Profiles, see:
+https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
+
+? Please choose the profile you want to use default
+```
+
+When you initialize a new Amplify project, a few things happen:
+
+- It creates a top level directory called `amplify` that stores your backend
+definition. During the tutorial you'll add capabilities such as a GraphQL API
+and authentication. As you add features, the `amplify` folder will grow with
+infrastructure-as-code templates that define your backend stack.
+Infrastructure-as-code is a best practice way to create a replicable backend stack.
+- It creates a file called `amplifyconfiguration.json` in the `src` directory that holds
+all the configuration for the services you create with Amplify. This is how the
+Amplify client is able to get the necessary information about your backend services.
+- It modifies the `.gitignore` file, adding some generated files to the ignore list
+- A cloud project is created for you in the AWS Amplify Console that can be
+accessed by running `amplify console`. The Console provides a list of backend
+environments, deep links to provisioned resources per Amplify category, status
+of recent deployments, and instructions on how to promote, clone, pull, and delete
+backend resources.
+
+As you add or remove categories and make updates to your backend configuration
+using the Amplify CLI, the configuration in `amplifyconfiguration.json` will update
+automatically.
+
+## Install Amplify libraries
+
+Install required dependencies to your Next.js app to start using Amplify.
+
+```bash
+npm install aws-amplify@next
+```
+
+You are now ready to start adding features to your application. Below are some examples of features you can start adding to your app.
+
+- [Authentication](/lib-v1/auth/getting-started)
+- [File Storage](/lib-v1/storage/getting-started)
+- [Analytics](/lib-v1/analytics/getting-started)
+
diff --git a/src/pages/lib-v1/project-setup/escape-hatch/index.mdx b/src/pages/lib-v1/project-setup/escape-hatch/index.mdx
new file mode 100644
index 00000000000..393712dcd45
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/escape-hatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/escape-hatch/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/escape-hatch/q/platform/[platform].mdx
index 4ac2280c823..c45db35645a 100644
--- a/src/pages/lib-v1/project-setup/escape-hatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/escape-hatch/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Escape hatch`,
- description: `Advanced use cases in Amplify Flutter`
+ description: `Advanced use cases in Amplify Flutter`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/project-setup/null-safety/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/null-safety/q/platform/[platform].mdx
deleted file mode 100644
index f1909f2450b..00000000000
--- a/src/pages/lib-v1/project-setup/null-safety/q/platform/[platform].mdx
+++ /dev/null
@@ -1,5 +0,0 @@
-export const meta = {
- title: `Null safety`,
- description: `Using Dart null safety with amplify-flutter`,
-};
-
diff --git a/src/pages/lib-v1/project-setup/platform-setup/index.mdx b/src/pages/lib-v1/project-setup/platform-setup/index.mdx
new file mode 100644
index 00000000000..89fa26d4604
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/platform-setup/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/platform-setup/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/platform-setup/q/platform/[platform].mdx
index f0a76f6ae86..3f06f7ad854 100644
--- a/src/pages/lib-v1/project-setup/platform-setup/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/platform-setup/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Platform Setup`,
- description: `Instructions for platform-specific configurations needed for amplify-flutter`
+ description: `Instructions for platform-specific configurations needed for amplify-flutter`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/project-setup/prereq/index.mdx b/src/pages/lib-v1/project-setup/prereq/index.mdx
new file mode 100644
index 00000000000..302bd544b57
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/prereq/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/prereq/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/prereq/q/platform/[platform].mdx
index cea938d36ad..7d73f454343 100644
--- a/src/pages/lib-v1/project-setup/prereq/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/prereq/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Prerequisites`,
- description: `Project Setup with Amplify - Prerequisites`
+ description: `Project Setup with Amplify - Prerequisites`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/project-setup/rxjava/index.mdx b/src/pages/lib-v1/project-setup/rxjava/index.mdx
new file mode 100644
index 00000000000..d109a01cf45
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/rxjava/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/rxjava/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/rxjava/q/platform/[platform].mdx
index 9b10c56b91e..e1b695f9281 100644
--- a/src/pages/lib-v1/project-setup/rxjava/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/rxjava/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Using RxJava with Amplify`,
description: `Amplify Android has first-class support for Reactive Extensions / RxJava.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android0 from "/src/fragments/lib-v1/project-setup/android/rxjava/rxjava.mdx";
+import android0 from '/src/fragments/lib-v1/project-setup/android/rxjava/rxjava.mdx';
-
+
diff --git a/src/pages/lib-v1/project-setup/use-existing-resources/index.mdx b/src/pages/lib-v1/project-setup/use-existing-resources/index.mdx
new file mode 100644
index 00000000000..32093349db9
--- /dev/null
+++ b/src/pages/lib-v1/project-setup/use-existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/project-setup/use-existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/project-setup/use-existing-resources/q/platform/[platform].mdx
index 60f7d5b897e..6b1b526e2eb 100644
--- a/src/pages/lib-v1/project-setup/use-existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/project-setup/use-existing-resources/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Use existing AWS resources`,
description: `Add existing AWS resources to an application without the CLI.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/project-setup/ios/use-existing-resources/use-existing-resources.mdx";
+import ios0 from '/src/fragments/lib-v1/project-setup/ios/use-existing-resources/use-existing-resources.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/project-setup/android/use-existing-resources/use-existing-resources.mdx";
+import android1 from '/src/fragments/lib-v1/project-setup/android/use-existing-resources/use-existing-resources.mdx';
-
+
diff --git a/src/pages/lib-v1/push-notifications/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/push-notifications/getting-started/q/platform/[platform].mdx
deleted file mode 100644
index 08b08e60de9..00000000000
--- a/src/pages/lib-v1/push-notifications/getting-started/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Getting started`,
- description: `Use of Push Notifications of Amplify`,
-};
diff --git a/src/pages/lib-v1/push-notifications/working-with-api/q/platform/[platform].mdx b/src/pages/lib-v1/push-notifications/working-with-api/q/platform/[platform].mdx
deleted file mode 100644
index 7542eccfdb5..00000000000
--- a/src/pages/lib-v1/push-notifications/working-with-api/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Working with API`,
- description: `Breakdown of using the Push Notifications API in Amplify`,
-};
diff --git a/src/pages/lib-v1/q/platform/[platform].mdx b/src/pages/lib-v1/q/platform/[platform].mdx
index 4b565495328..95962630204 100644
--- a/src/pages/lib-v1/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/q/platform/[platform].mdx
@@ -3,7 +3,25 @@ export const meta = {
description:
'The Amplify open-source client libraries provide use-case centric, opinionated, declarative, and easy-to-use interfaces across different categories of cloud powered operations enabling mobile and web developers to easily interact with their backends. ',
disableTOC: 'true',
- filterKey: 'platform'
+ filterKey: "platform",
+ supportedPlatforms: PLATFORM_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { PLATFORM_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/authz/index.mdx b/src/pages/lib-v1/restapi/authz/index.mdx
new file mode 100644
index 00000000000..c7f172f50bd
--- /dev/null
+++ b/src/pages/lib-v1/restapi/authz/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/authz/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/authz/q/platform/[platform].mdx
index d4b7b4cae3b..90b1435987e 100644
--- a/src/pages/lib-v1/restapi/authz/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/authz/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Define authorization rules`,
- description: `Learn more about how to define authorization rules for Amplify's REST API capabilities`
+ description: `Learn more about how to define authorization rules for Amplify's REST API capabilities`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/cancel/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/cancel/q/platform/[platform].mdx
deleted file mode 100644
index c17f6c4cdfb..00000000000
--- a/src/pages/lib-v1/restapi/cancel/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Cancel API requests`,
- description: `Using the Cancel API in Amplify`,
-};
diff --git a/src/pages/lib-v1/restapi/delete/index.mdx b/src/pages/lib-v1/restapi/delete/index.mdx
new file mode 100644
index 00000000000..e871ee81340
--- /dev/null
+++ b/src/pages/lib-v1/restapi/delete/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/delete/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/delete/q/platform/[platform].mdx
index 505239fc5b4..0ba35e8932f 100644
--- a/src/pages/lib-v1/restapi/delete/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/delete/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Deleting data`,
- description: `Using the Delete API REST in Amplify`
+ description: `Using the Delete API REST in Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/existing-resources/index.mdx b/src/pages/lib-v1/restapi/existing-resources/index.mdx
new file mode 100644
index 00000000000..04a5505cec5
--- /dev/null
+++ b/src/pages/lib-v1/restapi/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/existing-resources/q/platform/[platform].mdx
index d3f8e59beb2..ee9f0dacd3a 100644
--- a/src/pages/lib-v1/restapi/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/existing-resources/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use existing AWS resources`,
- description: `Configure the Amplify Libraries to use existing Amazon API Gateway resources by referencing them in your configuration.`
+ description: `Configure the Amplify Libraries to use existing Amazon API Gateway resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/fetch/index.mdx b/src/pages/lib-v1/restapi/fetch/index.mdx
new file mode 100644
index 00000000000..8605e68badb
--- /dev/null
+++ b/src/pages/lib-v1/restapi/fetch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/fetch/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/fetch/q/platform/[platform].mdx
index c8b1249789a..de622fb3b40 100644
--- a/src/pages/lib-v1/restapi/fetch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/fetch/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Fetching data`,
- description: `Using the GET API REST in Amplify`
+ description: `Using the GET API REST in Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/getting-started/index.mdx b/src/pages/lib-v1/restapi/getting-started/index.mdx
new file mode 100644
index 00000000000..4b8b0fac334
--- /dev/null
+++ b/src/pages/lib-v1/restapi/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/getting-started/q/platform/[platform].mdx
index ac32f300094..4451f9dace2 100644
--- a/src/pages/lib-v1/restapi/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `The API category provides a solution for making HTTP requests to REST and GraphQL endpoints. The REST API category can be used for creating signed requests against Amazon API Gateway when the API Gateway Authorization is set to AWS_IAM.`
+ description: `The API category provides a solution for making HTTP requests to REST and GraphQL endpoints. The REST API category can be used for creating signed requests against Amazon API Gateway when the API Gateway Authorization is set to AWS_IAM.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/restapi/update/index.mdx b/src/pages/lib-v1/restapi/update/index.mdx
new file mode 100644
index 00000000000..da48e425cfb
--- /dev/null
+++ b/src/pages/lib-v1/restapi/update/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/restapi/update/q/platform/[platform].mdx b/src/pages/lib-v1/restapi/update/q/platform/[platform].mdx
index d89d5326e5e..382b7097933 100644
--- a/src/pages/lib-v1/restapi/update/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/restapi/update/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Updating data`,
- description: `Using Post, Put, etc. in Amplify`
+ description: `Using Post, Put, etc. in Amplify`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/ssr/nextjs/index.mdx b/src/pages/lib-v1/ssr/nextjs/index.mdx
new file mode 100644
index 00000000000..51729a06853
--- /dev/null
+++ b/src/pages/lib-v1/ssr/nextjs/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/ssr/nextjs/q/platform/[platform].mdx b/src/pages/lib-v1/ssr/nextjs/q/platform/[platform].mdx
index e9f2545ae25..cd1d15f0b83 100644
--- a/src/pages/lib-v1/ssr/nextjs/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/ssr/nextjs/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use Amplify with Next.js`,
description: `Use Amplify with Next.js`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib-v1/storage/autotrack/q/platform/[platform].mdx b/src/pages/lib-v1/storage/autotrack/q/platform/[platform].mdx
deleted file mode 100644
index b7f63bc3f4a..00000000000
--- a/src/pages/lib-v1/storage/autotrack/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Automatically track events`,
- description: `You can enable automatic tracking of Storage Events such as uploads and downloads. Enabling this will automatically send Storage Events to Amazon Pinpoint and you will be able to see them within the AWS Pinpoint Console under Custom Events. `,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/storage/cancel-requests/q/platform/[platform].mdx b/src/pages/lib-v1/storage/cancel-requests/q/platform/[platform].mdx
deleted file mode 100644
index 51f51b901c3..00000000000
--- a/src/pages/lib-v1/storage/cancel-requests/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Cancel requests`,
- description: `Cancel an in-flight get or put requests from Storage`,
-};
diff --git a/src/pages/lib-v1/storage/configureaccess/index.mdx b/src/pages/lib-v1/storage/configureaccess/index.mdx
new file mode 100644
index 00000000000..26293198298
--- /dev/null
+++ b/src/pages/lib-v1/storage/configureaccess/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/configureaccess/q/platform/[platform].mdx b/src/pages/lib-v1/storage/configureaccess/q/platform/[platform].mdx
index 403c467fbd9..9a964fc57c2 100644
--- a/src/pages/lib-v1/storage/configureaccess/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/configureaccess/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `File access levels`,
- description: `Learn about configuring different access levels in Amplify Storage. Objects can be public, protected, or private.`
+ description: `Learn about configuring different access levels in Amplify Storage. Objects can be public, protected, or private.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/copy/index.mdx b/src/pages/lib-v1/storage/copy/index.mdx
new file mode 100644
index 00000000000..cfb9382afd2
--- /dev/null
+++ b/src/pages/lib-v1/storage/copy/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/copy/q/platform/[platform].mdx b/src/pages/lib-v1/storage/copy/q/platform/[platform].mdx
index 00d738a8d97..b905b89fa3b 100644
--- a/src/pages/lib-v1/storage/copy/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/copy/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Copy files`,
description: `Learn more about how to copy files using Amplify's storage category.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib-v1/storage/download/index.mdx b/src/pages/lib-v1/storage/download/index.mdx
new file mode 100644
index 00000000000..1e66014f598
--- /dev/null
+++ b/src/pages/lib-v1/storage/download/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/download/q/platform/[platform].mdx b/src/pages/lib-v1/storage/download/q/platform/[platform].mdx
index 6831146b65e..bdaca8068c7 100644
--- a/src/pages/lib-v1/storage/download/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/download/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Download files`,
- description: `Learn more about how to download / retrieve files using the Storage category of Amplify`
+ description: `Learn more about how to download / retrieve files using the Storage category of Amplify`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/escapehatch/index.mdx b/src/pages/lib-v1/storage/escapehatch/index.mdx
new file mode 100644
index 00000000000..e31a142b28f
--- /dev/null
+++ b/src/pages/lib-v1/storage/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/escapehatch/q/platform/[platform].mdx b/src/pages/lib-v1/storage/escapehatch/q/platform/[platform].mdx
index fda851bb52c..666954b4117 100644
--- a/src/pages/lib-v1/storage/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/escapehatch/q/platform/[platform].mdx
@@ -1,20 +1,39 @@
export const meta = {
title: `Escape hatch`,
description: `For specialized use cases where Amplify does not provide the functionality, you can use the escape hatch to access an AWSS3 low-level client instance. The returned AWSS3 instance is already configured with your access credentials.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
-import ios0 from "/src/fragments/lib-v1/storage/ios/escapehatch.mdx";
+import ios0 from '/src/fragments/lib-v1/storage/ios/escapehatch.mdx';
-
+
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
-import android1 from "/src/fragments/lib-v1/storage/android/escapehatch.mdx";
+import android1 from '/src/fragments/lib-v1/storage/android/escapehatch.mdx';
-
+
diff --git a/src/pages/lib-v1/storage/existing-resources/index.mdx b/src/pages/lib-v1/storage/existing-resources/index.mdx
new file mode 100644
index 00000000000..818178b2c49
--- /dev/null
+++ b/src/pages/lib-v1/storage/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/existing-resources/q/platform/[platform].mdx b/src/pages/lib-v1/storage/existing-resources/q/platform/[platform].mdx
index 4252e84bdd8..0017f986274 100644
--- a/src/pages/lib-v1/storage/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/existing-resources/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use existing AWS resources`,
- description: `Configure the Amplify Libraries to use an existing Amazon S3 bucket by referencing it in your configuration.`
+ description: `Configure the Amplify Libraries to use an existing Amazon S3 bucket by referencing it in your configuration.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/get-properties/index.mdx b/src/pages/lib-v1/storage/get-properties/index.mdx
new file mode 100644
index 00000000000..9d66ba7bca4
--- /dev/null
+++ b/src/pages/lib-v1/storage/get-properties/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/get-properties/q/platform/[platform].mdx b/src/pages/lib-v1/storage/get-properties/q/platform/[platform].mdx
index 806662396c4..a20b41e5de2 100644
--- a/src/pages/lib-v1/storage/get-properties/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/get-properties/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Get file properties`,
- description: `Learn more about how to get a file's properties without downloading the file using Amplify's storage category.`
+ description: `Learn more about how to get a file's properties without downloading the file using Amplify's storage category.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib-v1/storage/getting-started/index.mdx b/src/pages/lib-v1/storage/getting-started/index.mdx
new file mode 100644
index 00000000000..d417c4f35f0
--- /dev/null
+++ b/src/pages/lib-v1/storage/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/getting-started/q/platform/[platform].mdx b/src/pages/lib-v1/storage/getting-started/q/platform/[platform].mdx
index 371e664cbad..7078e9173f1 100644
--- a/src/pages/lib-v1/storage/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `The Amplify Storage category provides a simple mechanism for managing user content for your app in public, protected, or private storage buckets. The Amplify AWS S3 Storage plugin leverages Amazon S3.`
+ description: `The Amplify Storage category provides a simple mechanism for managing user content for your app in public, protected, or private storage buckets. The Amplify AWS S3 Storage plugin leverages Amazon S3.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/list/index.mdx b/src/pages/lib-v1/storage/list/index.mdx
new file mode 100644
index 00000000000..f5973713bd4
--- /dev/null
+++ b/src/pages/lib-v1/storage/list/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/list/q/platform/[platform].mdx b/src/pages/lib-v1/storage/list/q/platform/[platform].mdx
index 24206920b41..7fa219e0748 100644
--- a/src/pages/lib-v1/storage/list/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/list/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `List files`,
- description: `Learn more about how to list all of the uploaded objects using Amplify's storage category.`
+ description: `Learn more about how to list all of the uploaded objects using Amplify's storage category.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/overview/index.mdx b/src/pages/lib-v1/storage/overview/index.mdx
new file mode 100644
index 00000000000..b42263e0d8c
--- /dev/null
+++ b/src/pages/lib-v1/storage/overview/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/overview/q/platform/[platform].mdx b/src/pages/lib-v1/storage/overview/q/platform/[platform].mdx
index ed6f4b857fa..2cdde5751fb 100644
--- a/src/pages/lib-v1/storage/overview/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/overview/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Concepts`,
- description: `Learn more about the foundational storage concepts for cloud-based application and how they work with Amplify.`
+ description: `Learn more about the foundational storage concepts for cloud-based application and how they work with Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/remove/index.mdx b/src/pages/lib-v1/storage/remove/index.mdx
new file mode 100644
index 00000000000..efbb59c425b
--- /dev/null
+++ b/src/pages/lib-v1/storage/remove/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/remove/q/platform/[platform].mdx b/src/pages/lib-v1/storage/remove/q/platform/[platform].mdx
index ca14dab5919..d0178c47e46 100644
--- a/src/pages/lib-v1/storage/remove/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/remove/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Remove files`,
- description: `Learn more about how to remove files using Amplify's storage category`
+ description: `Learn more about how to remove files using Amplify's storage category`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/transfer-acceleration/index.mdx b/src/pages/lib-v1/storage/transfer-acceleration/index.mdx
new file mode 100644
index 00000000000..2fef290a898
--- /dev/null
+++ b/src/pages/lib-v1/storage/transfer-acceleration/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/transfer-acceleration/q/platform/[platform].mdx b/src/pages/lib-v1/storage/transfer-acceleration/q/platform/[platform].mdx
index 7ca10340d7a..a2eaf7fb0fe 100644
--- a/src/pages/lib-v1/storage/transfer-acceleration/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/transfer-acceleration/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use Transfer Acceleration`,
description: `How to enable and use S3's Transfer Acceleration on your S3 bucket`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib-v1/storage/triggers/index.mdx b/src/pages/lib-v1/storage/triggers/index.mdx
new file mode 100644
index 00000000000..5d6ad19c9f1
--- /dev/null
+++ b/src/pages/lib-v1/storage/triggers/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/triggers/q/platform/[platform].mdx b/src/pages/lib-v1/storage/triggers/q/platform/[platform].mdx
index e6f38d450b7..edd95aabbfd 100644
--- a/src/pages/lib-v1/storage/triggers/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/triggers/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Lambda triggers`,
- description: `Learn more about how to enable triggers for the Storage Category with Amazon S3 & Amazon DynamoDB as Providers. The CLI supports associating Lambda triggers with S3 and DynamoDB events. `
+ description: `Learn more about how to enable triggers for the Storage Category with Amazon S3 & Amazon DynamoDB as Providers. The CLI supports associating Lambda triggers with S3 and DynamoDB events. `,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter_maintenance from '/src/fragments/lib-v1/flutter-maintenance.mdx';
diff --git a/src/pages/lib-v1/storage/upload/index.mdx b/src/pages/lib-v1/storage/upload/index.mdx
new file mode 100644
index 00000000000..894dd223e2e
--- /dev/null
+++ b/src/pages/lib-v1/storage/upload/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/storage/upload/q/platform/[platform].mdx b/src/pages/lib-v1/storage/upload/q/platform/[platform].mdx
index ca7fb8ea71b..fde6aa0edee 100644
--- a/src/pages/lib-v1/storage/upload/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/storage/upload/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Upload files`,
- description: `Learn more about how to upload files using Amplify's storage category`
+ description: `Learn more about how to upload files using Amplify's storage category`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import ios_maintenance from '/src/fragments/lib-v1/ios-maintenance.mdx';
@@ -52,7 +71,7 @@ try {
```
### Public level
-The `accessLevel` defaults to 'guest'
+The `accessLevel` defaults to `guest`
```javascript
import { uploadData } from 'aws-amplify/storage';
diff --git a/src/pages/lib-v1/troubleshooting/upgrading/index.mdx b/src/pages/lib-v1/troubleshooting/upgrading/index.mdx
new file mode 100644
index 00000000000..6ee9f8eb85a
--- /dev/null
+++ b/src/pages/lib-v1/troubleshooting/upgrading/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/troubleshooting/upgrading/q/platform/[platform].mdx b/src/pages/lib-v1/troubleshooting/upgrading/q/platform/[platform].mdx
index 627ba742ca2..bbc53d632e4 100644
--- a/src/pages/lib-v1/troubleshooting/upgrading/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/troubleshooting/upgrading/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Upgrading Amplify packages `,
- description: `Upgrading Amplify packages `
+ description: `Upgrading Amplify packages `,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import flutter1 from '/src/fragments/lib-v1/troubleshooting/flutter/upgrading.mdx';
diff --git a/src/pages/lib-v1/utilities/cache/q/platform/[platform].mdx b/src/pages/lib-v1/utilities/cache/q/platform/[platform].mdx
deleted file mode 100644
index 435da188ef0..00000000000
--- a/src/pages/lib-v1/utilities/cache/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Cache`,
- description: `The Amplify Cache module provides a generic LRU cache for JavaScript developers to store data with priority and expiration settings.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/utilities/hub/index.mdx b/src/pages/lib-v1/utilities/hub/index.mdx
new file mode 100644
index 00000000000..fba0a73f6bc
--- /dev/null
+++ b/src/pages/lib-v1/utilities/hub/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib-v1/utilities/hub/q/platform/[platform].mdx b/src/pages/lib-v1/utilities/hub/q/platform/[platform].mdx
index 0564c307297..d3d8a7a7a66 100644
--- a/src/pages/lib-v1/utilities/hub/q/platform/[platform].mdx
+++ b/src/pages/lib-v1/utilities/hub/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Hub`,
description: `Amplify has a local eventing system called Hub. It is a lightweight implementation of Publisher-Subscriber pattern, and is used to share data between modules and components in your app. `,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android_maintenance from '/src/fragments/lib-v1/android-maintenance.mdx';
diff --git a/src/pages/lib-v1/utilities/i18n/q/platform/[platform].mdx b/src/pages/lib-v1/utilities/i18n/q/platform/[platform].mdx
deleted file mode 100644
index a0b0ccdb6b8..00000000000
--- a/src/pages/lib-v1/utilities/i18n/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Internationalization`,
- description: `The AWS Amplify I18n module is a lightweight internationalization solution.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/utilities/logger/q/platform/[platform].mdx b/src/pages/lib-v1/utilities/logger/q/platform/[platform].mdx
deleted file mode 100644
index 5cf02b4cdbb..00000000000
--- a/src/pages/lib-v1/utilities/logger/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Logger`,
- description: `AWS Amplify writes console logs through Logger. You can use Logger in your apps for the same purpose.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib-v1/utilities/serviceworker/q/platform/[platform].mdx b/src/pages/lib-v1/utilities/serviceworker/q/platform/[platform].mdx
deleted file mode 100644
index 180b638194a..00000000000
--- a/src/pages/lib-v1/utilities/serviceworker/q/platform/[platform].mdx
+++ /dev/null
@@ -1,4 +0,0 @@
-export const meta = {
- title: `Service Worker`,
- description: `AWS Amplify ServiceWorker class enables registering a service worker in the browser and communicating with it via postMessage events, so that you can create rich offline experiences with Push APIs and analytics.`,
-};
\ No newline at end of file
diff --git a/src/pages/lib/analytics/autotrack/index.mdx b/src/pages/lib/analytics/autotrack/index.mdx
new file mode 100644
index 00000000000..f5c65622b5d
--- /dev/null
+++ b/src/pages/lib/analytics/autotrack/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/autotrack/q/platform/[platform].mdx b/src/pages/lib/analytics/autotrack/q/platform/[platform].mdx
index 635cbfd5d07..f8a292d363c 100644
--- a/src/pages/lib/analytics/autotrack/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/autotrack/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Automatically track sessions`,
- description: `The Amplify analytics plugin records when an application opens and closes. This session information can be viewed either from your local computer’s terminal or the AWS Console for Pinpoint.`
+ description: `The Amplify analytics plugin records when an application opens and closes. This session information can be viewed either from your local computer’s terminal or the AWS Console for Pinpoint.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib/analytics/create-custom-plugin/index.mdx b/src/pages/lib/analytics/create-custom-plugin/index.mdx
new file mode 100644
index 00000000000..a7119a79bef
--- /dev/null
+++ b/src/pages/lib/analytics/create-custom-plugin/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/create-custom-plugin/q/platform/[platform].mdx b/src/pages/lib/analytics/create-custom-plugin/q/platform/[platform].mdx
index a4c97f6ef16..cb610e691c4 100644
--- a/src/pages/lib/analytics/create-custom-plugin/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/create-custom-plugin/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Create a custom plugin`,
- description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`
+ description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/js/create-custom-plugin.mdx';
diff --git a/src/pages/lib/analytics/enable-disable/index.mdx b/src/pages/lib/analytics/enable-disable/index.mdx
new file mode 100644
index 00000000000..4aedb021f2c
--- /dev/null
+++ b/src/pages/lib/analytics/enable-disable/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/enable-disable/q/platform/[platform].mdx b/src/pages/lib/analytics/enable-disable/q/platform/[platform].mdx
index a694b9cc91f..02f0baec4b0 100644
--- a/src/pages/lib/analytics/enable-disable/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/enable-disable/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Enable/Disable Analytics`,
- description: `Learn how to enable/disable analytics using Amplify.`
+ description: `Learn how to enable/disable analytics using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
## Disable Analytics
diff --git a/src/pages/lib/analytics/escapehatch/index.mdx b/src/pages/lib/analytics/escapehatch/index.mdx
new file mode 100644
index 00000000000..2bf1b7f9377
--- /dev/null
+++ b/src/pages/lib/analytics/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/escapehatch/q/platform/[platform].mdx b/src/pages/lib/analytics/escapehatch/q/platform/[platform].mdx
index 2e47beb866e..a5699a5f84f 100644
--- a/src/pages/lib/analytics/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/escapehatch/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Escape hatch`,
description: `For advanced use cases where Amplify does not provide the functionality, you can retrieve the escape hatch to access the AWSPinpoint instance.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from "/src/fragments/lib/analytics/ios/escapehatch.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import android1 from "/src/fragments/lib/analytics/android/escapehatch.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import ios0 from '/src/fragments/lib/analytics/ios/escapehatch.mdx';
+
+
+
+import android1 from '/src/fragments/lib/analytics/android/escapehatch.mdx';
-
+
diff --git a/src/pages/lib/analytics/existing-resources/index.mdx b/src/pages/lib/analytics/existing-resources/index.mdx
new file mode 100644
index 00000000000..df05ba20fa4
--- /dev/null
+++ b/src/pages/lib/analytics/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/existing-resources/q/platform/[platform].mdx b/src/pages/lib/analytics/existing-resources/q/platform/[platform].mdx
index 85e86d40240..f7c8093ed53 100644
--- a/src/pages/lib/analytics/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/existing-resources/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Use existing AWS resources`,
- description: `Configure the Amplify Libraries to use existing Amazon Pinpoint resources by referencing them in your configuration.`
+ description: `Configure the Amplify Libraries to use existing Amazon Pinpoint resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import android0 from '/src/fragments/lib/analytics/android/existing-resources.mdx';
diff --git a/src/pages/lib/analytics/getting-started/index.mdx b/src/pages/lib/analytics/getting-started/index.mdx
new file mode 100644
index 00000000000..0f33eb245a8
--- /dev/null
+++ b/src/pages/lib/analytics/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/getting-started/q/platform/[platform].mdx b/src/pages/lib/analytics/getting-started/q/platform/[platform].mdx
index a5ac42332fa..600c7b52523 100644
--- a/src/pages/lib/analytics/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Getting started`,
- description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`
+ description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/native_common/getting-started/common.mdx';
diff --git a/src/pages/lib/analytics/identifyuser/index.mdx b/src/pages/lib/analytics/identifyuser/index.mdx
new file mode 100644
index 00000000000..27d0427a458
--- /dev/null
+++ b/src/pages/lib/analytics/identifyuser/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/identifyuser/q/platform/[platform].mdx b/src/pages/lib/analytics/identifyuser/q/platform/[platform].mdx
index 32fc4f20e47..c2f6d9cc061 100644
--- a/src/pages/lib/analytics/identifyuser/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/identifyuser/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Identify user`,
- description: `Use the Amplify analytics plugin to inform Pinpoint about your users.`
+ description: `Use the Amplify analytics plugin to inform Pinpoint about your users.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
diff --git a/src/pages/lib/analytics/personalize/index.mdx b/src/pages/lib/analytics/personalize/index.mdx
new file mode 100644
index 00000000000..ca4c9318705
--- /dev/null
+++ b/src/pages/lib/analytics/personalize/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/personalize/q/platform/[platform].mdx b/src/pages/lib/analytics/personalize/q/platform/[platform].mdx
index bebb7e17b77..9868963cade 100644
--- a/src/pages/lib/analytics/personalize/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/personalize/q/platform/[platform].mdx
@@ -1,8 +1,27 @@
export const meta = {
title: `Personalized recommendations`,
description: `Amazon Personalize can create recommendations by using event data, historical data, or a combination of both. The event data can then be used to create recommendations.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/lib/analytics/js/personalize.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
\ No newline at end of file
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/lib/analytics/js/personalize.mdx';
+
+
diff --git a/src/pages/lib/analytics/record/index.mdx b/src/pages/lib/analytics/record/index.mdx
new file mode 100644
index 00000000000..15bed9836d4
--- /dev/null
+++ b/src/pages/lib/analytics/record/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/record/q/platform/[platform].mdx b/src/pages/lib/analytics/record/q/platform/[platform].mdx
index dd2a6de08b2..f1d360ccf10 100644
--- a/src/pages/lib/analytics/record/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/record/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Record events`,
- description: `Learn how to record analytics events using Amplify.`
+ description: `Learn how to record analytics events using Amplify.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/js/record.mdx';
diff --git a/src/pages/lib/analytics/storing/index.mdx b/src/pages/lib/analytics/storing/index.mdx
new file mode 100644
index 00000000000..ad4fedf7428
--- /dev/null
+++ b/src/pages/lib/analytics/storing/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/storing/q/platform/[platform].mdx b/src/pages/lib/analytics/storing/q/platform/[platform].mdx
index fb35b37042d..2907796213a 100644
--- a/src/pages/lib/analytics/storing/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/storing/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Storing analytics data`,
- description: `The Amazon Kinesis Firehose analytics provider allows you to send analytics data to an Amazon Kinesis Firehose stream for reliably storing data.`
+ description: `The Amazon Kinesis Firehose analytics provider allows you to send analytics data to an Amazon Kinesis Firehose stream for reliably storing data.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/js/storing.mdx';
diff --git a/src/pages/lib/analytics/streaming/index.mdx b/src/pages/lib/analytics/streaming/index.mdx
new file mode 100644
index 00000000000..e096c1c9e94
--- /dev/null
+++ b/src/pages/lib/analytics/streaming/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/streaming/q/platform/[platform].mdx b/src/pages/lib/analytics/streaming/q/platform/[platform].mdx
index fb99afd5afc..3f90489ba17 100644
--- a/src/pages/lib/analytics/streaming/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/streaming/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Streaming analytics data`,
- description: `The Amazon Kinesis analytics provider allows you to send analytics data to an Amazon Kinesis stream for real-time processing.`
+ description: `The Amazon Kinesis analytics provider allows you to send analytics data to an Amazon Kinesis stream for real-time processing.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/js/streaming.mdx';
diff --git a/src/pages/lib/analytics/update-endpoint/index.mdx b/src/pages/lib/analytics/update-endpoint/index.mdx
new file mode 100644
index 00000000000..31c4083e0b3
--- /dev/null
+++ b/src/pages/lib/analytics/update-endpoint/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/analytics/update-endpoint/q/platform/[platform].mdx b/src/pages/lib/analytics/update-endpoint/q/platform/[platform].mdx
index 8d35c3ae05e..8f87a3561ec 100644
--- a/src/pages/lib/analytics/update-endpoint/q/platform/[platform].mdx
+++ b/src/pages/lib/analytics/update-endpoint/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Update Endpoint`,
- description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`
+ description: `The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and Amazon Kinesis (Kinesis support is currently only available in the Amplify JavaScript library). The Analytics category uses Amazon Cognito Identity pools to identify users in your App. Cognito allows you to receive data from authenticated, and unauthenticated users in your App.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
import js0 from '/src/fragments/lib/analytics/js/update-endpoint.mdx';
diff --git a/src/pages/lib/auth/access_credentials/index.mdx b/src/pages/lib/auth/access_credentials/index.mdx
new file mode 100644
index 00000000000..c56a7a62c46
--- /dev/null
+++ b/src/pages/lib/auth/access_credentials/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/access_credentials/q/platform/[platform].mdx b/src/pages/lib/auth/access_credentials/q/platform/[platform].mdx
index a1baa70c542..ebe0afa3ef3 100644
--- a/src/pages/lib/auth/access_credentials/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/access_credentials/q/platform/[platform].mdx
@@ -1,16 +1,35 @@
export const meta = {
title: `Accessing credentials`,
description: `Use AWS Cognito Auth plugin to access auth credentials`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from "/src/fragments/lib/auth/native_common/access_credentials/common.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import android1 from "/src/fragments/lib/auth/native_common/access_credentials/common.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import ios0 from '/src/fragments/lib/auth/native_common/access_credentials/common.mdx';
+
+
+
+import android1 from '/src/fragments/lib/auth/native_common/access_credentials/common.mdx';
-
+
-import flutter2 from "/src/fragments/lib/auth/native_common/access_credentials/common.mdx";
+import flutter2 from '/src/fragments/lib/auth/native_common/access_credentials/common.mdx';
-
+
diff --git a/src/pages/lib/auth/advanced/index.mdx b/src/pages/lib/auth/advanced/index.mdx
new file mode 100644
index 00000000000..6f828814654
--- /dev/null
+++ b/src/pages/lib/auth/advanced/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/advanced/q/platform/[platform].mdx b/src/pages/lib/auth/advanced/q/platform/[platform].mdx
index 68b41a5ea32..dd926971931 100644
--- a/src/pages/lib/auth/advanced/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/advanced/q/platform/[platform].mdx
@@ -1,24 +1,43 @@
export const meta = {
title: `Advanced workflows`,
description: `Learn more about advanced workflows in the Amplify auth category. This includes subscribing to events, identity pool federation, auth-related Lambda triggers and working with AWS service objects.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from "/src/fragments/lib/auth/ios/advanced/advanced.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import android0 from "/src/fragments/lib/auth/android/advanced/advanced.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import ios0 from '/src/fragments/lib/auth/ios/advanced/advanced.mdx';
+
+
+
+import android0 from '/src/fragments/lib/auth/android/advanced/advanced.mdx';
-
+
-import js0 from "/src/fragments/lib/auth/js/advanced.mdx";
+import js0 from '/src/fragments/lib/auth/js/advanced.mdx';
-
+
-import reactnative0 from "/src/fragments/lib/auth/js/advanced.mdx";
+import reactnative0 from '/src/fragments/lib/auth/js/advanced.mdx';
-
+
-import flutter from "/src/fragments/lib/auth/flutter/advanced/advanced.mdx";
+import flutter from '/src/fragments/lib/auth/flutter/advanced/advanced.mdx';
-
+
diff --git a/src/pages/lib/auth/auth-events/index.mdx b/src/pages/lib/auth/auth-events/index.mdx
new file mode 100644
index 00000000000..c9ddcdb162e
--- /dev/null
+++ b/src/pages/lib/auth/auth-events/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/auth-events/q/platform/[platform].mdx b/src/pages/lib/auth/auth-events/q/platform/[platform].mdx
index 1366cd7cc52..d77718b8ccd 100644
--- a/src/pages/lib/auth/auth-events/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/auth-events/q/platform/[platform].mdx
@@ -1,26 +1,327 @@
export const meta = {
- title: `Auth events`,
+ title: `Listen to auth events`,
description: `Listen to various auth events`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-AWS Cognito Auth Plugin sends important events through Amplify Hub.
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+
+
+Tapping into auth events allows you to react to user flows in real time and trigger custom business logic. For example, you may want to capture data, synchronize your app's state, and personalize the user's experience. You can listen to and respond to events across the Auth lifecycle such as sign-in and sign-out. In this guide we will describe how you can listen to these auth events.
+
+Before you begin, you will need:
+
+- An Amplify project with the Auth category configured
+- The Amplify libraries installed and configured
+
+## Expose hub events triggered in response to auth actions
+
+You can use Amplify Hub with its built in Amplify Auth events to subscribe a listener using a publish-subscribe pattern and capture events between different parts of your application. The Amplify Auth category publishes in the `auth` channel when auth events such as `signIn`, `signUp`, and `signOut` happen independent from your app code.
+
+
+
+You can review the Amplify Hub guide to [learn more](/lib/utilities/hub/q/platform/js/).
+
+
+
+Channels are logical group names that help you organize dispatching and listening. However, some channels are protected and cannot be used to publish custom events, and `auth` is one of these channels. Sending unexpected payloads to protected channels can have undesirable side effects such as impacting authentication flows. See the [Amplify Hub](/lib/utilities/hub/q/platform/js/) guide for more protected channels.
+
+
+
+
+
+
+
+You can review the Amplify Hub guide to [learn more](/lib/utilities/hub/q/platform/react-native/).
+
+
+
+Channels are logical group names that help you organize dispatching and listening. However, some channels are protected and cannot be used to publish custom events, and `auth` is one of these channels. Sending unexpected payloads to protected channels can have undesirable side effects such as impacting authentication flows. See the [Amplify Hub](/lib/utilities/hub/q/platform/react-native/) guide for more protected channels.
+
+
+
+
+
+Here is a basic example of setting up a listener that logs an event emitted through the `auth` channel:
+
+```javascript
+import { Hub } from 'aws-amplify';
+
+const listener = (data) => {
+ console.log(data);
+}
+
+Hub.listen('auth', listener)
+
+```
+
+Once your app is set up to subscribe and listen to specific event types from the `auth` channel, the listeners will be notified asynchronously when an event occurs. This pattern allows for a one-to-many relationship where one auth event can be shared with many different listeners that have been subscribed. This lets your app react based on the event rather than proactively poll for information.
-import reactnative0 from "/src/fragments/lib/auth/js/hub_events/10_listen_events.mdx";
+Additionally, you can set up your listener to extract data from the event payload and execute a callback that you define. For example, you might update UI elements in your app to reflect your user's authenticated state after the `signIn` or `signOut` events, listen for `signUp` events to capture user registrations, or capture metrics after a success or failure.
-
+### Listen to and log auth events
-import js0 from "/src/fragments/lib/auth/js/hub_events/10_listen_events.mdx";
+One of the most common workflows will be to log events. In this example you can see how you can listen and target specific `auth` events using a `switch` to log your own messages.
-
+
+
+
+```ts
+import { Hub } from 'aws-amplify';
+
+const listener = (data) => {
+ switch (data?.payload?.event) {
+ case 'configured':
+ console.log('the Auth module is configured');
+ break;
+ case 'signIn':
+ console.log('user signed in');
+ break;
+ case 'signIn_failure':
+ console.log('user sign in failed');
+ break;
+ case 'signUp':
+ console.log('user signed up');
+ break;
+ case 'signUp_failure':
+ console.log('user sign up failed');
+ break;
+ case 'confirmSignUp':
+ console.log('user confirmation successful');
+ break;
+ case 'completeNewPassword_failure':
+ console.log('user did not complete new password flow');
+ break;
+ case 'autoSignIn':
+ console.log('auto sign in successful');
+ break;
+ case 'autoSignIn_failure':
+ console.log('auto sign in failed');
+ break;
+ case 'forgotPassword':
+ console.log('password recovery initiated');
+ break;
+ case 'forgotPassword_failure':
+ console.log('password recovery failed');
+ break;
+ case 'forgotPasswordSubmit':
+ console.log('password confirmation successful');
+ break;
+ case 'forgotPasswordSubmit_failure':
+ console.log('password confirmation failed');
+ break;
+ case 'verify':
+ console.log('TOTP token verification successful');
+ break;
+ case 'tokenRefresh':
+ console.log('token refresh succeeded');
+ break;
+ case 'tokenRefresh_failure':
+ console.log('token refresh failed');
+ break;
+ case 'cognitoHostedUI':
+ console.log('Cognito Hosted UI sign in successful');
+ break;
+ case 'cognitoHostedUI_failure':
+ console.log('Cognito Hosted UI sign in failed');
+ break;
+ case 'customOAuthState':
+ console.log('custom state returned from CognitoHosted UI');
+ break;
+ case 'customState_failure':
+ console.log('custom state failure');
+ break;
+ case 'parsingCallbackUrl':
+ console.log('Cognito Hosted UI OAuth url parsing initiated');
+ break;
+ case 'userDeleted':
+ console.log('user deletion successful');
+ break;
+ case 'updateUserAttributes':
+ console.log('user attributes update successful');
+ break;
+ case 'updateUserAttributes_failure':
+ console.log('user attributes update failed');
+ break;
+ case 'signOut':
+ console.log('user signed out');
+ break;
+ default:
+ console.log('unknown event type');
+ break;
+ }
+};
+
+Hub.listen('auth', listener);
+```
+
+
+
+```js
+import { Hub } from 'aws-amplify';
+
+const listener = (data) => {
+ switch (data?.payload?.event) {
+ case 'configured':
+ console.log('the Auth module is configured');
+ break;
+ case 'signIn':
+ console.log('user signed in');
+ break;
+ case 'signIn_failure':
+ console.log('user sign in failed');
+ break;
+ case 'signUp':
+ console.log('user signed up');
+ break;
+ case 'signUp_failure':
+ console.log('user sign up failed');
+ break;
+ case 'confirmSignUp':
+ console.log('user confirmation successful');
+ break;
+ case 'completeNewPassword_failure':
+ console.log('user did not complete new password flow');
+ break;
+ case 'autoSignIn':
+ console.log('auto sign in successful');
+ break;
+ case 'autoSignIn_failure':
+ console.log('auto sign in failed');
+ break;
+ case 'forgotPassword':
+ console.log('password recovery initiated');
+ break;
+ case 'forgotPassword_failure':
+ console.log('password recovery failed');
+ break;
+ case 'forgotPasswordSubmit':
+ console.log('password confirmation successful');
+ break;
+ case 'forgotPasswordSubmit_failure':
+ console.log('password confirmation failed');
+ break;
+ case 'verify':
+ console.log('TOTP token verification successful');
+ break;
+ case 'tokenRefresh':
+ console.log('token refresh succeeded');
+ break;
+ case 'tokenRefresh_failure':
+ console.log('token refresh failed');
+ break;
+ case 'cognitoHostedUI':
+ console.log('Cognito Hosted UI sign in successful');
+ break;
+ case 'cognitoHostedUI_failure':
+ console.log('Cognito Hosted UI sign in failed');
+ break;
+ case 'customOAuthState':
+ console.log('custom state returned from CognitoHosted UI');
+ break;
+ case 'customState_failure':
+ console.log('custom state failure');
+ break;
+ case 'parsingCallbackUrl':
+ console.log('Cognito Hosted UI OAuth url parsing initiated');
+ break;
+ case 'userDeleted':
+ console.log('user deletion successful');
+ break;
+ case 'updateUserAttributes':
+ console.log('user attributes update successful');
+ break;
+ case 'updateUserAttributes_failure':
+ console.log('user attributes update failed');
+ break;
+ case 'signOut':
+ console.log('user signed out');
+ break;
+ default:
+ console.log('unknown event type');
+ break;
+ }
+};
+
+Hub.listen('auth', listener);
+```
+
+
+
+### Stop listening to events
+
+You can also stop listening for messages by calling the result of the `Hub.listen()` function. This may be useful if you no longer need to receive messages in your application flow. This can also help you avoid any memory leaks on low powered devices when you are sending large amounts of data through Amplify Hub on multiple channels.
+
+To stop listening to a certain event, you need to wrap the listener function with a variable and call it once you no longer need it:
+
+```javascript
+
+/* start listening for messages */
+const hubListenerCancelToken = Hub.listen('auth', (data) => {
+ console.log('Listening for all auth events: ', data.payload.data);
+});
+
+/* later */
+hubListenerCancelToken(); // stop listening for messages
+```
+
+You now have a few use cases and examples for listening to and responding to auth events.
+
+## Conclusion
+
+Congratulations! You finished the **Listen to auth events** guide. In this guide, you learned how to listen for auth events across workflows.
+
+## Next steps
+
+Now that you can listen to auth events you may also want to add some additional features. We recommend you learn more about:
+
+
+
+- [Manage user profile](/lib/auth/manageusers/q/platform/js/)
+- [Set up password change and recovery](/lib/auth/password_management/q/platform/js/)
+
+
+
+
+
+- [Manage user profile](/lib/auth/manageusers/q/platform/react-native/)
+- [Set up password change and recovery](/lib/auth/password_management/q/platform/react-native/)
+
+
+
+
+
+
+
+AWS Cognito Auth Plugin sends important events through Amplify Hub.
import ios1 from "/src/fragments/lib/auth/ios/hub_events/10_listen_events.mdx";
-
+
+
+import android2 from '/src/fragments/lib/auth/android/hub_events/10_listen_events.mdx';
-import android2 from "/src/fragments/lib/auth/android/hub_events/10_listen_events.mdx";
+
-
+import flutter3 from '/src/fragments/lib/auth/flutter/hub_events/10_listen_events.mdx';
-import flutter3 from "/src/fragments/lib/auth/flutter/hub_events/10_listen_events.mdx";
+
-
+
diff --git a/src/pages/lib/auth/delete_user/index.mdx b/src/pages/lib/auth/delete_user/index.mdx
new file mode 100644
index 00000000000..9c90275ded9
--- /dev/null
+++ b/src/pages/lib/auth/delete_user/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/delete_user/q/platform/[platform].mdx b/src/pages/lib/auth/delete_user/q/platform/[platform].mdx
index 911bfa22b29..34d94b1e191 100644
--- a/src/pages/lib/auth/delete_user/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/delete_user/q/platform/[platform].mdx
@@ -1,23 +1,116 @@
export const meta = {
- title: `Delete user`,
- description: `Delete a user`
+ title: `Delete user account`,
+ description: `Learn how to delete a user account.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from '/src/fragments/lib/auth/native_common/delete_user/common.mdx';
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import flutter1 from '/src/fragments/lib/auth/native_common/delete_user/common.mdx';
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
-
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+
+
+Empowering users to delete their account can improve trust and transparency. You can programmatically enable self-service account deletion with Amplify Auth. In this guide, we will review how you can enable this feature for your users.
+
+Before you begin, you will need:
+- An Amplify project with the Auth category configured
+- The Amplify Libraries installed and configured
+- A test user to delete
+
+## Allow my users to delete their account
+
+You can quickly set up account deletion for your users with the Amplify Libraries. Invoking the `deleteUser` API to delete a user from the Auth category will also sign out your user.
+
+If your application uses a Cognito User Pool, which is the default configuration, this action will only delete the user from the Cognito User Pool. It will have no effect if you are federating with a Cognito Identity Pool alone.
+
+
+
+ Before invoking the `deleteUser` API, you may need to first delete associated user data that is not stored in Cognito. For example, if you are using Amplify GraphQL API to persist user data, you could follow [these instructions](https://gist.github.com/aws-amplify-ops/27954c421bd72930874d48c15c284807) to delete associated user data. This allows you to address any guidelines (such as GDPR) that require your app to delete data associated with a user who deletes their account.
+
+
+
+You can enable account deletion using the following method:
+
+
+
+
+```ts
+import { Auth } from 'aws-amplify';
+
+async function deleteUser() {
+ try {
+ const result = await Auth.deleteUser();
+ console.log(result);
+ } catch (error) {
+ console.log('Error deleting user', error);
+ }
+}
+```
+
+
-import javascript2 from '/src/fragments/lib/auth/js/delete_user.mdx';
+```js
+import { Auth } from 'aws-amplify';
-
+async function deleteUser() {
+ try {
+ const result = await Auth.deleteUser();
+ console.log(result);
+ } catch (error) {
+ console.log('Error deleting user', error);
+ }
+}
+```
+
+
-import reactnative0 from '/src/fragments/lib/auth/js/delete_user.mdx';
+We recommend you update your UI to let your users know that their account is deleted and test the functionality with a test user. Note that your user will be signed out of your application when they delete their account.
-
+## Conclusion
+
+Congratulations! You finished the **Delete user account** guide. In this guide, you learned how to enable account deletion for your users.
+
+## Next steps
+
+Now that you enabled account deletion you may also want to add some additional features. We recommend you learn more about:
+
+
+
+- [Manage user profile](/lib/auth/manageusers/q/platform/js/)
+- [Set up password change and recovery](/lib/auth/password_management/q/platform/js/)
+
+
+
+
+
+- [Manage user profile](/lib/auth/manageusers/q/platform/react-native/)
+- [Set up password change and recovery](/lib/auth/password_management/q/platform/react-native/)
+
+
+
+
+
+import ios0 from '/src/fragments/lib/auth/native_common/delete_user/common.mdx';
+
+
+
+import flutter1 from '/src/fragments/lib/auth/native_common/delete_user/common.mdx';
+
+
import android3 from '/src/fragments/lib/auth/native_common/delete_user/common.mdx';
diff --git a/src/pages/lib/auth/device_features/index.mdx b/src/pages/lib/auth/device_features/index.mdx
new file mode 100644
index 00000000000..7ccd9e59138
--- /dev/null
+++ b/src/pages/lib/auth/device_features/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/device_features/q/platform/[platform].mdx b/src/pages/lib/auth/device_features/q/platform/[platform].mdx
index 301f41ed9a4..fd928f96b6e 100644
--- a/src/pages/lib/auth/device_features/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/device_features/q/platform/[platform].mdx
@@ -1,24 +1,43 @@
export const meta = {
title: `Remember a device`,
description: `You can use the device related features of Amazon Cognito UserPools by enabling the Devices features. Go to your Cognito UserPool, click on Devices in Left Navigation Menu and chose one of User Opt In or Always.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import js0 from "/src/fragments/lib/auth/common/device_features/common.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import reactnative0 from "/src/fragments/lib/auth/common/device_features/common.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import js0 from '/src/fragments/lib/auth/common/device_features/common.mdx';
+
+
+
+import reactnative0 from '/src/fragments/lib/auth/common/device_features/common.mdx';
-
+
-import ios1 from "/src/fragments/lib/auth/common/device_features/common.mdx";
+import ios1 from '/src/fragments/lib/auth/common/device_features/common.mdx';
-
+
-import android2 from "/src/fragments/lib/auth/common/device_features/common.mdx";
+import android2 from '/src/fragments/lib/auth/common/device_features/common.mdx';
-
+
-import flutter3 from "/src/fragments/lib/auth/common/device_features/common.mdx";
+import flutter3 from '/src/fragments/lib/auth/common/device_features/common.mdx';
-
\ No newline at end of file
+
diff --git a/src/pages/lib/auth/emailpassword/index.mdx b/src/pages/lib/auth/emailpassword/index.mdx
new file mode 100644
index 00000000000..d254ab0d355
--- /dev/null
+++ b/src/pages/lib/auth/emailpassword/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/emailpassword/q/platform/[platform].mdx b/src/pages/lib/auth/emailpassword/q/platform/[platform].mdx
index 6db8592a484..3e01b688bd2 100644
--- a/src/pages/lib/auth/emailpassword/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/emailpassword/q/platform/[platform].mdx
@@ -1,49 +1,74 @@
export const meta = {
title: `Enable sign-up, sign-in, and sign-out`,
- description: `Learn how to use Amplify's sign up, sign in and sign out APIs.`,
+ description: `Learn how to use Amplify's sign-up, sign-in, and sign-out APIs.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
-In this guide you will set up sign-up, sign-in, and sign-out using the Amplify Libraries and then test this functionality. This includes a review of sign-up methods provided by Amplify, the specific user attributes used by Amazon Cognito, how to confirm users after initial sign-up, and the differences between local and global sign-out. Once set up you can connect it to your frontend UI.
+In this guide, you will set up sign-up, sign-in, and sign-out using the Amplify Libraries and then test this functionality. This includes a review of sign-up methods provided by Amplify, the specific user attributes used by Amazon Cognito, how to confirm users after initial sign-up, and the differences between local and global sign-out. Once set up, you can connect this functionality to your frontend UI.
+
+
-This guide is for those who want to set up Amplify Auth with the Amplify Libraries. If you want to create a sign in and registration experience for your app with a few lines of code we recommend using the [Authenticator component](https://ui.docs.amplify.aws/react/connected-components/authenticator) which provides a customizable UI and complete authentication flows.
+This guide is for those who want to set up Amplify Auth with the Amplify Libraries. If you want to create a sign-in and registration experience for your app with a few lines of code, we recommend using the [Authenticator component](https://ui.docs.amplify.aws/react/connected-components/authenticator), which provides a customizable UI and complete authentication flows.
-
-
-Before you begin, you should have finished the [*'Set up and connect backend resources'*](/lib/auth/getting-started/q/platform/js/) guide.
+Before you begin, you should have finished the [*Set up and connect backend resources*](/lib/auth/getting-started/q/platform/js/#set-up-and-connect-backend-resources) section of the *Set up Amplify Auth* guide.
-Before you begin, you should have finished the [*'Set up and connect backend resources'*](/lib/auth/getting-started/q/platform/react-native/#set-up-backend-resources) guide.
+
+
+This guide is for those who want to set up Amplify Auth with the Amplify Libraries. If you want to create a sign-in and registration experience for your app with a few lines of code, we recommend using the [Authenticator component](https://ui.docs.amplify.aws/react-native/connected-components/authenticator), which provides a customizable UI and complete authentication flows.
+
+
+
+Before you begin, you should have finished the [*Set up backend resources*](/lib/auth/getting-started/q/platform/react-native/#set-up-backend-resources) section of the *Set up Amplify Auth* guide.
## Decide before you build
-Before you enable sign-up, sign-in, and sign-out there are a few decisions you will need to know to complete the process.
+Before you enable sign-up, sign-in, and sign-out, you will need to make a few decisions to complete the process.
Below is a high-level overview of the workflows for sign-up, sign-in, and sign-out with Amplify authentication:
-**Sign-up:** The username/password set up will ask your user for a username (or email) and a password. This should also include any attributes you include in your sign-up form such as address, birthdate, phone, etc. When your end-user submits this information, it is then passed through the `Auth.signUp()` method to your Amazon Cognito User Pool, where a user is created. By default, the user will receive a confirmation message via email or SMS, depending on what you configured, but you also have the option to auto-confirm your users after they sign up. Users must then enter the confirmation code to complete the sign-up process. Once the user is verified, their user profile is officially confirmed and is active in the Cognito User Pool. The profile contains the username, password, and any other attributes collected during sign-up. This user profile can then be used to sign-in and access your application.
+**Sign-up:** The username and password setup will ask your user for a username (or email) and a password. This should also include any attributes you include in your sign-up form, such as address, birthdate, and phone. When your end user submits this information, it is then passed through the `Auth.signUp()` method to your Amazon Cognito User Pool, where a user is created. By default, the user will receive a confirmation message by email or SMS, depending on what you configured, but you also have the option to auto-confirm your users after they sign up. Users must then enter the confirmation code to complete the sign-up process. Once the user is verified, their user profile is officially confirmed and is active in the Cognito User Pool. The profile contains the username, password, and any other attributes collected during sign-up. This user profile can then be used to sign in and access your application.
-**Sign-in:** The user enters the username/password they created on sign-up and submits the form in your application to sign-in. The application will then call the `Auth.signIn()` method to sign-in the user by passing the username/password to verify and establish a session with Amazon Cognito which will then generate the needed tokens to grant access. Amazon Cognito issues temporary short-lived tokens on sign-in (default of 1 hour) but you can update these settings to keep your users signed in for longer (up to 24 hours).
+**Sign-in:** The user enters the username and password they created on sign-up and submits the form in your application to sign in. The application will then call the `Auth.signIn()` method to sign in the user by passing the username and password to verify and establish a session with Amazon Cognito, which will then generate the needed tokens to grant access. Amazon Cognito issues temporary short-lived tokens on sign-in (default of 1 hour), but you can update these settings to keep your users signed in for longer (up to 24 hours).
-**Sign-out:** Amplify uses the `Auth.signOut()` method to sign-out the user by ending the current session and revoking the tokens with Amazon Cognito. This clears the user session in the browser and the application will then navigate the user to the sign-in screen.
+**Sign-out:** Amplify uses the `Auth.signOut()` method to sign out the user by ending the current session and revoking the tokens with Amazon Cognito. This clears the user session in the browser and the application will then navigate the user to the sign-in screen.
### Which Amazon Cognito attributes will you pass for sign-up?
-User attributes (e.g. username, email, etc.) are used to identify your users. These are set up when you configure your Cognito User Pool and cannot be renamed or deleted after they are added. You can use the Amplify CLI to add user attributes or visit the Amazon Cognito console. To add user attributes with the CLI, you can run the command `amplify add auth` for a new project, or use `amplify update auth` if you already have existing resources set up. Then, you can select `manual configuration` when prompted by the Amplify CLI.
+User attributes (such as username and email) are used to identify your users. These are set up when you configure your Cognito User Pool and cannot be renamed or deleted after they are added. You can use the Amplify CLI to add user attributes or visit the Amazon Cognito console. To add user attributes with the CLI, you can run the command `amplify add auth` for a new project, or use `amplify update auth` if you already have existing resources set up. Then, you can select `manual configuration` when prompted by the Amplify CLI.
```sh
? amplify update auth
@@ -66,25 +91,25 @@ User attributes are not required by default. You can make user attributes requir
### How will you verify users at sign-up?
-Once the initial sign-up is done, the user will need to verify and confirm their contact information before their account is activated. This is done by sending a verification code via email or phone number that can be collected on initial sign-up. Email verification asks the user to click a link or enter a code sent to their email address provided during sign-up. Phone verification is done by asking the user to enter the code sent to them in a SMS text message. You can also enable auto-confirmation to skip this step and automatically confirm the user after sign-up. This is accomplished using the `PreSignUp` Lambda trigger which is explained in the [Amazon Cognito documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html).
+Once the initial sign-up is done, the user will need to verify and confirm their contact information before their account is activated. This is done by sending a verification code by email or phone number that can be collected on initial sign-up. Email verification asks the user to click a link or enter a code sent to their email address provided during sign-up. Phone verification is done by asking the user to enter the code sent to them in an SMS text message. You can also enable auto-confirmation to skip this step and automatically confirm the user after sign-up. This is accomplished using the pre sign-up Lambda trigger, which is explained in the [Amazon Cognito documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html).
-Once you have these decisions in mind you are ready to enable sign-up, sign-in, and sign-out.
+Once you have these decisions in mind, you are ready to enable sign-up, sign-in, and sign-out.
## Add the sign-up, sign-in, and sign-out capabilities
You can add the functionality to enable sign-up, sign-in, and sign-out with the Amplify Libraries. You can connect this to an existing UI or create your own.
-For many apps, user sign-up and sign-in with a username/password is all that is required. Once authenticated, the app can talk to an API to access and mutate data.
+For many apps, user sign-up and sign-in with a username and password is all that is required. Once authenticated, the app can talk to an API to access and mutate data.
-We will use the username/password authentication flow to get started. Both [third party social provider federation](/lib/auth/social/q/platform/js/) and [Multi-factor authentication](/lib/auth/mfa/q/platform/js/) can be added after this initial set up.
+We will use the username and password authentication flow to get started. Both [third-party social provider federation](/lib/auth/social/q/platform/js/) and [Multi-factor authentication](/lib/auth/mfa/q/platform/js/) can be added after this initial setup.
-We will use the username/password authentication flow to get started. Both [third party social provider federation](/lib/auth/social/q/platform/react-native/) and [Multi-factor authentication](/lib/auth/mfa/q/platform/react-native/) can be added after this initial set up.
+We will use the username and password authentication flow to get started. Both [third-party social provider federation](/lib/auth/social/q/platform/react-native/) and [Multi-factor authentication](/lib/auth/mfa/q/platform/react-native/) can be added after this initial set up.
@@ -260,7 +285,7 @@ async function signIn() {
### Sign-out
-To set up local sign-out you use the `signOut` method of the Auth class.
+To set up local sign-out, you use the `signOut` method of the Auth class.
@@ -293,7 +318,7 @@ async function signOut() {
-You can sign out users from all devices by adding global sign-out. It also invalidates all refresh tokens issued to an user. The user's current access and Id tokens remain valid on other devices until the refresh token expires (access and Id tokens expire one hour after they are issued).
+You can sign out users from all devices by adding global sign-out. It also invalidates all refresh tokens issued to an user. The user's current access and ID tokens remain valid on other devices until the refresh token expires (access and ID tokens expire one hour after they are issued).
@@ -342,7 +367,7 @@ Congratulations! You finished the **Enable sign-up, sign-in, sign-out** guide an
-Now that you completed setting up Amplify Auth with username/password you may also want to add some additional features. We recommend:
+Now that you completed setting up Amplify Auth with username and password, you may also want to add some additional features. We recommend:
- [Social sign-in (OAuth)](/lib/auth/social/q/platform/js/)
- [Multi-factor authentication](/lib/auth/mfa/q/platform/js/)
@@ -350,7 +375,7 @@ Now that you completed setting up Amplify Auth with username/password you may al
- Now that you completed setting up Amplify Auth with username/password you may also want to add some additional features. We recommend:
+ Now that you completed setting up Amplify Auth with username and password, you may also want to add some additional features. We recommend:
- [Social sign-in (OAuth)](/lib/auth/social/q/platform/react-native/)
- [Multi-factor authentication](/lib/auth/mfa/q/platform/react-native/)
diff --git a/src/pages/lib/auth/escapehatch/index.mdx b/src/pages/lib/auth/escapehatch/index.mdx
new file mode 100644
index 00000000000..47f42d65f77
--- /dev/null
+++ b/src/pages/lib/auth/escapehatch/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/escapehatch/q/platform/[platform].mdx b/src/pages/lib/auth/escapehatch/q/platform/[platform].mdx
index a1a6a3ad2a7..64a704f002a 100644
--- a/src/pages/lib/auth/escapehatch/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/escapehatch/q/platform/[platform].mdx
@@ -1,12 +1,31 @@
export const meta = {
title: `Escape hatch`,
description: `Underlying service`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import ios0 from "/src/fragments/lib/auth/native_common/escape_hatch/common.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import android1 from "/src/fragments/lib/auth/native_common/escape_hatch/common.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import ios0 from '/src/fragments/lib/auth/native_common/escape_hatch/common.mdx';
+
+
+
+import android1 from '/src/fragments/lib/auth/native_common/escape_hatch/common.mdx';
-
+
diff --git a/src/pages/lib/auth/existing-resources/index.mdx b/src/pages/lib/auth/existing-resources/index.mdx
new file mode 100644
index 00000000000..52f0f1c952b
--- /dev/null
+++ b/src/pages/lib/auth/existing-resources/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/existing-resources/q/platform/[platform].mdx b/src/pages/lib/auth/existing-resources/q/platform/[platform].mdx
index 6ebf029366b..c6049ec4642 100644
--- a/src/pages/lib/auth/existing-resources/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/existing-resources/q/platform/[platform].mdx
@@ -1,16 +1,35 @@
export const meta = {
title: `Use existing Amazon Cognito resources`,
description: `Configure the Amplify Libraries to use existing Amazon Cognito resources by referencing them in your configuration.`,
+ filterKey: 'platform',
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
};
-import android0 from "/src/fragments/lib/auth/existing-resources.mdx";
+import { generateStaticPaths } from '@/utils/generateStaticPaths.tsx';
-
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
-import ios1 from "/src/fragments/lib/auth/existing-resources.mdx";
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
+};
+
+import android0 from '/src/fragments/lib/auth/existing-resources.mdx';
+
+
+
+import ios1 from '/src/fragments/lib/auth/existing-resources.mdx';
-
+
-import flutter2 from "/src/fragments/lib/auth/existing-resources.mdx";
+import flutter2 from '/src/fragments/lib/auth/existing-resources.mdx';
-
+
diff --git a/src/pages/lib/auth/getting-started/index.mdx b/src/pages/lib/auth/getting-started/index.mdx
new file mode 100644
index 00000000000..fde6cbace08
--- /dev/null
+++ b/src/pages/lib/auth/getting-started/index.mdx
@@ -0,0 +1,12 @@
+import ChooseFilterPage from '@/components/ChooseFilterPage';
+
+import { INTEGRATION_FILTER_OPTIONS } from '@/utils/filter-data.ts';
+
+
diff --git a/src/pages/lib/auth/getting-started/q/platform/[platform].mdx b/src/pages/lib/auth/getting-started/q/platform/[platform].mdx
index 6fdacec54c5..2e719cec912 100644
--- a/src/pages/lib/auth/getting-started/q/platform/[platform].mdx
+++ b/src/pages/lib/auth/getting-started/q/platform/[platform].mdx
@@ -1,6 +1,25 @@
export const meta = {
title: `Set up Amplify Auth`,
description: `Amplify uses Amazon Cognito as the main authentication provider. Learn how to handle user registration, authentication, account recovery and other operations.`,
+ filterKey: "platform",
+ supportedPlatforms: INTEGRATION_FILTER_OPTIONS
+};
+
+import { generateStaticPaths } from "@/utils/generateStaticPaths.tsx";
+
+import { INTEGRATION_FILTER_OPTIONS } from "@/utils/filter-data.ts";
+
+export const getStaticPaths = () => {
+ return generateStaticPaths(meta.filterKey, meta.supportedPlatforms);
+};
+
+export const getStaticProps = (context) => {
+ return {
+ props: {
+ platform: context.params.platform,
+ filterKind: meta.filterKey
+ }
+ };
};
@@ -9,14 +28,14 @@ import guide from "/src/fragments/common/guide-header.mdx";
-In this guide, you will learn how to set up Amplify **Auth**. This includes setting up and connecting your backend resources, determining your integration path, and enabling sign-up, sign-in, and sign-out with the Authenticator UI component. We will also provide more context on how resources are managed and created with Amplify to help you make decisions, and understand any long-term impact of those decisions.
+In this guide, you will learn how to set up Amplify **Auth**. This includes setting up and connecting your backend resources, determining your integration path, and enabling sign-up, sign-in, and sign-out with the Authenticator UI component. We will also provide more context on how resources are managed and created with Amplify to help you make decisions and understand any long-term impact of those decisions.
Before you begin, you will need:
- [Node.js](https://nodejs.org/) v14.x or later
- [npm](https://www.npmjs.com/) v6.14.4 or later
- [git](https://git-scm.com/) v2.14.1 or later
- A frontend app
-- If you want Amplify to set up and manage your backend resources you need to [install and configure](/lib/project-setup/prereq/q/platform/js/) the Amplify CLI. Make sure to also create a new Amplify project using `amplify init` in your terminal, or pull in an existing Amplify project to your frontend app by using `amplify pull`.
+- If you want Amplify to set up and manage your backend resources, you need to [install and configure](/lib/project-setup/prereq/q/platform/js/) the Amplify CLI. Make sure to also create a new Amplify project using `amplify init` in your terminal, or pull in an existing Amplify project to your frontend app by using `amplify pull`.
## Set up and connect backend resources
@@ -24,15 +43,15 @@ We will review the paths to integrate Amplify Auth before you set up and integra
### Decide how to create and manage your backend resources
-You can create and manage your Authentication resources with Amplify by using the Amplify CLI, Amplify Studio, or manage them yourself with tools such as CDK and CloudFormation. The path we recommend is via the Amplify CLI, which allows you to create new authentication resources or import existing ones. However, you can also use the Amplify Studio console to configure or use existing resources and directly connect them to your application using the Amplify Libraries. These tools will help you with creating and managing your resources.
+You can create and manage your Authentication resources with Amplify by using the Amplify CLI, Amplify Studio, or manage them yourself with tools such as CDK and CloudFormation. The path we recommend is through the Amplify CLI, which allows you to create new authentication resources or import existing ones. However, you can also use the Amplify Studio console to configure or use existing resources and directly connect them to your application using the Amplify Libraries. These tools will help you with creating and managing your resources.
-With Amplify Auth, you can use a username and password as an authentication method, use a social provider such as "Sign In with Google" or "Sign in With Apple," or create a fully custom authentication flow.
+With Amplify Auth, you can use a username and password as an authentication method, use a social provider such as "Sign in with Google" or "Sign in with Apple," or create a fully custom authentication flow.
Amplify helps you secure your application while providing an easy sign-in experience for your users. This experience is influenced by your security strategy. This security strategy includes the authentication method, security credentials, and enabling additional verification when needed.
- - *Authentication* is a process to validate **who you are** (abbreviated as *AuthN*). The system which does this validation is referred to as an Identity Provider or IdP. This can be your own self-hosted IdP or a cloud service. Oftentimes, this IdP is a social provider such as Facebook, Google, or Amazon.
+ - *Authentication* is a process to validate **who you are** (abbreviated as *AuthN*). The system that does this validation is referred to as an Identity Provider or IdP. This can be your own self-hosted IdP or a cloud service. Oftentimes, this IdP is a social provider such as Facebook, Google, or Amazon.
- *Authorization* is the process of validating **what you can access** (abbreviated as *AuthZ*). This is sometimes done by looking at tokens with custom logic, predefined rules, or signed requests with policies.
Common authentication methods and associated risks include:
@@ -41,32 +60,32 @@ Common authentication methods and associated risks include:
You can improve security credentials and verification for these authentication methods by:
- Adding password policies that ensure stronger passwords are created by your users.
-- Require additional contact information from users before they can reset passwords.
-- Add multi-factor authentication which adds a layer of security at sign-in but may also add friction for your users.
+- Requiring additional contact information from users before they can reset passwords.
+- Adding multi-factor authentication (MFA) which adds a layer of security at sign-in but may also add friction for your users.
-Amplify uses [Amazon Cognito](https://aws.amazon.com/cognito/) as the main authentication provider. Amazon Cognito is a robust user directory service that handles user registration, authentication, account recovery, and other operations. If you have not worked with Amazon Cognito before we recommend taking a closer look at Amazon Cognito configuration options before you continue, since some of them are irreversible after your resources are created.
+Amplify uses [Amazon Cognito](https://aws.amazon.com/cognito/) as the main authentication provider. Amazon Cognito is a robust user directory service that handles user registration, authentication, account recovery, and other operations. If you have not worked with Amazon Cognito before, we recommend taking a closer look at Amazon Cognito configuration options before you continue, since some of them are irreversible after your resources are created.
-Amazon Cognito can be customized based on your security strategy for authentication. However, there are some initial configuration options that cannot be changed after the backend resources are configured:
+Amazon Cognito can be customized based on your security strategy for authentication. However, some initial configuration options cannot be changed after the backend resources are configured:
-- User attributes that are used to identify your individual users (e.g. username, email, etc.) cannot be renamed or deleted.
-- Sign-in methods (including username, email, phone, etc.) cannot be added or changed after the initial configuration. This includes both defining which attributes are used to sign in and which attributes are required. Required attributes must have a value for all users once set.
-- Verification methods (including username, email, etc.) are the same as required attributes and cannot be removed once configured.
+- User attributes that are used to identify your individual users (such as username and email) cannot be renamed or deleted.
+- Sign-in methods (including username, email, and phone) cannot be added or changed after the initial configuration. This includes both defining which attributes are used to sign in and which attributes are required. Required attributes must have a value for all users once set.
+- Verification methods (including username and email) are the same as required attributes and cannot be removed once configured.
- The `sub` attribute is a unique identifier within each user pool that cannot be modified and can be used to index and search users.
-- If MFA is set to required for all users, you will need to include MFA setup when users sign up.
+- If MFA is set to **required** for all users, you will need to include MFA setup when users sign up.
-See the [Amazon Cognito documentation]( https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html) for more details on these settings including [User pool attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html) and [Adding MFA to a user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html).
+See the [Amazon Cognito documentation]( https://docs.aws.amazon.com/cognito/latest/developerguide/what-is-amazon-cognito.html) for more details on these settings, including [User pool attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html) and [Adding MFA to a user pool](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html).
### Set up and configure Amplify Auth
-In this section you will learn how to set up your backend resources and install the Amplify Libraries to use with your application.
+In this section, you will learn how to set up your backend resources and install the Amplify Libraries to use with your application.
#### Set up your Auth backend resources
@@ -77,7 +96,7 @@ You can set up your backend resources with the Amplify CLI, Amplify Studio, or u
> Prerequisites: [Install and configure](/lib/project-setup/prereq/q/platform/js/) the Amplify CLI in addition to the Amplify Libraries.
-To start provisioning auth resources in the backend, go to your project directory and **execute the command**:
+To start provisioning auth resources in the backend, go to your project directory and **run the command**:
```bash
amplify add auth
@@ -88,15 +107,15 @@ amplify add auth
? How do you want users to be able to sign in? Username
? Do you want to configure advanced settings? No, I am done.
```
-> If you have previously enabled an Amplify category that uses Auth behind the scenes (e.g. API category), you can run the `amplify update auth` command to edit your configuration if needed.
+> If you have previously enabled an Amplify category that uses Auth behind the scenes (such as API category), you can run the `amplify update auth` command to edit your configuration if needed.
The CLI prompts will help you to customize your auth flow for your app. With the provided options, you can:
- Customize sign-in/registration flow
-- Customize email and SMS messages for Multi-Factor Authentication
-- Customize attributes for your users, e.g. name, email
-- Enable 3rd party social providers, e.g. Facebook, Twitter, Google and Amazon
+- Customize email and SMS messages for multi-factor authentication
+- Customize attributes for your users, such as name and email
+- Enable third-party social providers, such as Facebook, Twitter, Google, and Amazon
-If you wish to federate with social providers [you will need to configure them first](/lib/auth/social#social-providers-and-federation).
+If you wish to federate with social providers, [you will need to configure them first](/lib/auth/social#social-providers-and-federation).
After configuring your Authentication options, update your backend and deploy the service by running the `push` command:
@@ -104,13 +123,13 @@ After configuring your Authentication options, update your backend and deploy th
amplify push
```
-Now, the authentication service has been deployed and you can start using it. To view the deployed services in your project at any time, go to Amplify Console by running the following command:
+Now, the authentication service has been deployed and you can start using it. To view the deployed services in your project at any time, go to the Amplify console by running the following command:
```bash
amplify console
```
-In your app's entry point (i.e. **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
+In your app's entry point (specifically, **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
```javascript
import { Amplify, Auth } from 'aws-amplify';
@@ -124,7 +143,7 @@ Amplify.configure(awsconfig);
> Prerequisites: [Install and configure](/lib/project-setup/prereq/q/platform/js/) the Amplify CLI in addition to the Amplify Libraries.
-To import existing Amazon Cognito resources into your Amplify project, **execute the command**:
+To import existing Amazon Cognito resources into your Amplify project, **run the command**:
```bash
amplify import auth
@@ -136,12 +155,12 @@ amplify import auth
Cognito User Pool only
```
-Once you've selected an option, you'll be able to search for and import an existing Cognito User Pool and Identity Pool (or User Pool only) within your AWS account. The `amplify import auth` command will also do the following:
+Once you've selected an option, you will be able to search for and import an existing Cognito User Pool and Identity Pool (or User Pool only) within your AWS account. The `amplify import auth` command will also do the following:
- Automatically populate your Amplify Library configuration files (aws-exports.js, amplifyconfiguration.json) with your chosen Amazon Cognito resource information
-- Provide your designated existing Cognito resource as the authentication & authorization mechanism for all auth-dependent categories (API, Storage and more)
+- Provide your designated existing Cognito resource as the authentication and authorization mechanism for all auth-dependent categories (API, Storage, and more)
- Enable Lambda functions to access the chosen Cognito resource if you permit it
-> If you have previously enabled an Amplify category that uses Auth behind the scenes (e.g. API category), you can run the `amplify update auth` command to edit your configuration if needed.
+> If you have previously enabled an Amplify category that uses Auth behind the scenes (such as API category), you can run the `amplify update auth` command to edit your configuration if needed.
After configuring your Authentication options, update your backend and deploy the service by running the `push` command:
@@ -149,13 +168,13 @@ After configuring your Authentication options, update your backend and deploy th
amplify push
```
-Now, the authentication service has been deployed and you can start using it. To view the deployed services in your project at any time, go to Amplify Console by running the following command:
+Now, the authentication service has been deployed and you can start using it. To view the deployed services in your project at any time, go to the Amplify console by running the following command:
```bash
amplify console
```
-In your app's entry point (i.e. **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
+In your app's entry point (specifically, **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
```javascript
import { Amplify, Auth } from 'aws-amplify';
@@ -169,19 +188,19 @@ Amplify.configure(awsconfig);
> Prerequisites: [Install and configure](/lib/project-setup/prereq/q/platform/js/) the Amplify CLI in addition to the Amplify Libraries.
-Amplify Studio allows you create auth resources, set up authorization rules, implement Multi-factor authentication (MFA), and more via an intuitive UI. To set up Authentication through the Amplify Studio, take the following steps:
+Amplify Studio allows you to create auth resources, set up authorization rules, implement multi-factor authentication (MFA), and more through an intuitive UI. To set up Authentication through Amplify Studio, take the following steps:
1. **Sign in** to the [AWS Management Console](https://console.aws.amazon.com/console/home) and open AWS Amplify.
2. In the navigation pane, **choose an application**.
3. On the application information page, choose the **Backend environments** tab, then choose **Launch Studio**.
4. On the **Set up** menu, choose **Authentication**.
-5. In the **Configure log in** section, choose a login mechanism to add from the **Add login mechanism** list. Valid options are _Username_, _Phone number_, _Facebook_, _Google_, _Amazon_, and _Sign in with Apple_. If you choose one of the social sign-in mechanisms (i.e. _Facebook_, _Google_, _Amazon_, or _Sign in with Apple_), you will also need to enter your _App ID_, _App Secret_, and redirect URLs.
+5. In the **Configure login** section, choose a login mechanism to add from the **Add login mechanism** list. Valid options are _Username_, _Phone number_, _Facebook_, _Google_, _Amazon_, and _Sign in with Apple_. If you choose one of the social sign-in mechanisms (specifically, _Facebook_, _Google_, _Amazon_, or _Sign in with Apple_), you will also need to enter your _App ID_, _App Secret_, and redirect URLs.
6. (Optional) Add multi-factor authentication (MFA). MFA is set to **Off** by default. To turn on MFA, do the following in the **Multi-factor authentication** section:
* Choose **Enforced** to require MFA for all users or choose **Optional** to allow individual users to enable MFA.
* (Optional) Choose **SMS**, and enter your SMS message.
-* (Optional) Choose **Authenticator Application** if you want your app to load with an authentication flow that includes sign up and sign in.
-7. In the **Configure sign up** section, expand **Password protection settings** and customize the password policy settings to enforce. u6. Choose **Save and Deploy**. This starts a CloudFormation deployment with the progress displayed in the upper right corner of the page.
-8. After creating and configuring your auth resources, you'll need to pull them down from Amplify Studio. To do so, simply click on "Local setup instructions" in the upper right hand corner of the Studio console and execute the CLI command it provides at the root directory of your app.
+* (Optional) Choose **Authenticator Application** if you want your app to load with an authentication flow that includes sign-up and sign-in.
+7. In the **Configure sign-up** section, expand **Password protection settings** and customize the password policy settings to enforce. Choose **Save and Deploy**. This starts a CloudFormation deployment with the progress displayed in the upper right corner of the page.
+8. After creating and configuring your auth resources, you will need to pull them down from Amplify Studio. To do so, simply select "Local setup instructions" in the upper right-hand corner of the Studio console and run the CLI command it provides at the root directory of your app.
> You can also [import](https://docs.amplify.aws/console/auth/import/) existing Amazon Cognito resources and [manage users and groups](https://docs.amplify.aws/console/auth/user-management/) through the Amplify Studio UI.
@@ -189,9 +208,9 @@ Amplify Studio allows you create auth resources, set up authorization rules, imp
-Existing Authentication resources from AWS (e.g. Amazon Cognito UserPools or Identity Pools) can be used with the Amplify Libraries by calling the `Amplify.configure()` method.
+Existing Authentication resources from AWS (such as Amazon Cognito User Pools or Identity Pools) can be used with the Amplify Libraries by calling the `Amplify.configure()` method.
-In your app's entry point (i.e. **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
+In your app's entry point (specifically **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file:
```javascript
import { Amplify, Auth } from 'aws-amplify';
@@ -268,16 +287,16 @@ Amplify.configure({
const currentConfig = Auth.configure();
```
-If your existing UserPool client has a required attribute that is NOT set to mutable, you may face login issues when using Social sign-in. To resolve this, you will need to create a new UserPool client and mark the required attribute as mutable.
+If your existing user pool client has a required attribute that is *not* set to mutable, you may face login issues when using social sign-in. To resolve this, you will need to create a new user pool client and mark the required attribute as mutable.
#### OAuth configuration parameters:
-These settings can be found in the Cognito User Pools console under **App Integration** section
-- `domain`: This can be found in the **Domain name** sub section
-- `scope`: Remember to have the scope allowed on the Cognito App client, this can be found on **App client settings** sub section
-- `redirectSignIn`: URL must be present on **Callback URL(s)** , check on **App client settings** sub section
-- `redirectSignOut`: URL must be present on **Sign out URL(s)**, check on **App client settings** sub section
-- `responseType`: Option must be enabled on the App client, look for **Allowed OAuth Flows** on **App client settings** sub section. *Authorization code grant* is for 'code' value and *Implicit grant* is for 'token' value.
+These settings can be found in the Cognito User Pools console under the **App Integration** section
+- `domain`: This can be found in the **Domain name** subsection
+- `scope`: Remember to have the scope allowed on the Cognito App client; this can be found in the **App client settings** subsection
+- `redirectSignIn`: URL must be present on **Callback URL(s)**; check in the **App client settings** subsection
+- `redirectSignOut`: URL must be present on **Sign out URL(s)**; check in the **App client settings** subsection
+- `responseType`: Option must be enabled on the App client; look for **Allowed OAuth Flows** in the **App client settings** subsection. *Authorization code grant* is for 'code' value and *Implicit grant* is for 'token' value.
@@ -291,23 +310,23 @@ Before you implement Auth on your frontend application, you will want to evaluat
### Compare implementation options
-There are a few options to implement Auth depending on how much customization you will need:
+There are a few options to implement Auth, depending on how much customization you will need:
| | Amplify Authenticator | Amplify Libraries |
|:--|:--|:--|
| **Description** | Open source drop-in UI component for authentication | Low-level building blocks for implementing authentication |
| **Benefits** | Automatically integrates with your existing Amplify configuration and allows you to easily add the entire authentication flow to your application. You can then customize themes to adjust colors and styling as needed. | Gives you full control over the UI and logic implementation. |
-| **Constraints** | Dependent on Amplify CLI for provisioning resources. | Requires the building of screens and frontend logic to enable the sign in and registration experiences. |
+| **Constraints** | Dependent on Amplify CLI for provisioning resources. | Requires the building of screens and frontend logic to enable the sign-in and registration experiences. |
-We recommend using the Authenticator UI component for quick and easy set up and then use the Amplify Libraries to customize the user experience and logic as needed. Once you decide which option will work for your use case, you can continue implementing authentication on your frontend application. If you prefer to work directly with the APIs, you can review the [*Enable Sign-up, Sign-in, and Sign-out*](/lib/auth/emailpassword/q/platform/js/) guide.
+We recommend using the Authenticator UI component for quick and easy setup and then use the Amplify Libraries to customize the user experience and logic as needed. Once you decide which option will work for your use case, you can continue implementing authentication on your frontend application. If you prefer to work directly with the APIs, you can review the [*Enable sign-up, sign-in, and sign-out*](/lib/auth/emailpassword/q/platform/js/) guide.
## Build an Authentication experience using the Authenticator
-Creating the sign-in flow can be quite difficult and time consuming to get right. However, Amplify has the Authenticator UI component which you can use to quickly build the entire authentication flow for your app, using your backend configuration.
+Creating the sign-in flow can be quite difficult and time-consuming to get right. However, Amplify has the Authenticator UI component which you can use to quickly build the entire authentication flow for your app, using your backend configuration.
-Amplify has pre-built UI components for React, Vue, Angular, React Native, Swift, Android, and Flutter. In this guide we are focusing on those for web applications.
+Amplify has pre-built UI components for React, Vue, Angular, React Native, Swift, Android, and Flutter. In this guide, we are focusing on those for web applications.
@@ -322,7 +341,7 @@ Next, open __src/App.js__ and add the `withAuthenticator` component.
**withAuthenticator**
-The `withAuthenticator` is a higher-order component (HoC) that wraps `Authenticator`. You'll also notice the `user` and `signOut` are provided to the wrapped component.
+The `withAuthenticator` is a higher-order component (HoC) that wraps `Authenticator`. You will also notice that `user` and `signOut` are provided to the wrapped component.
**Usage**
@@ -388,7 +407,7 @@ Next, open __src/App.js__ and add the `Authenticator` component.
**Authenticator**
-The `Authenticator` component offers a simple way to add authentication flows into your app. This component encapsulates an authentication workflow in the framework of your choice and is backed by the cloud resources set up in your Auth cloud resources. You’ll also notice that `user` and `signOut` are passed to the inner template.
+The `Authenticator` component offers a simple way to add authentication flows into your app. This component encapsulates an authentication workflow in the framework of your choice and is backed by the cloud resources set up in your Auth cloud resources. You will also notice that `user` and `signOut` are passed to the inner template.
```html