From 3d8a47f2659cd35396930fce2f1fc34801a2411d Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Fri, 14 Mar 2025 10:22:57 -0600 Subject: [PATCH 1/2] change data prop names --- .../[platform]/start/migrate-to-gen2/index.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/[platform]/start/migrate-to-gen2/index.mdx b/src/pages/[platform]/start/migrate-to-gen2/index.mdx index 1edc0e69a3d..0b16d2667d4 100644 --- a/src/pages/[platform]/start/migrate-to-gen2/index.mdx +++ b/src/pages/[platform]/start/migrate-to-gen2/index.mdx @@ -54,7 +54,7 @@ The most notable change between Amplify Gen 1 backends and Gen 2 backends is the **Testers Only** -Prerequisites: +Prerequisites: - Node.js v18.17.1 or higher - [Local AWS CLI profile](/gen1/[platform]/start/getting-started/installation/) with `AdministratorAccess-Amplify` and the `AmplifyBackendDeployFullAccess` policies attached. @@ -82,7 +82,7 @@ amplify add env migrate -**Testers Only** +**Testers Only** For testing purposes, you will need to additionally install the tagged versions of the `@aws-amplify/cli` package. @@ -96,7 +96,7 @@ Then push your newly-created `migrate` environment to create a set of resources -**Testers Only** +**Testers Only** If you have API resources, you will need to enable the following feature flag in your `amplify/cli.json` file: @@ -176,7 +176,7 @@ npm install -**Testers Only** +**Testers Only** For testing purposes, you will need to additionally install the tagged versions of the `@aws-amplify/backend` and `@aws-amplify/backend-data` packages. @@ -211,10 +211,10 @@ If you have GraphQL API, you would need to manually input your schema in `data/r ```typescript import { defineData } from "@aws-amplify/backend"; export const data = defineData({ - migratedAmplifyGen1DynamoDbTableMap: [ + migratedAmplifyGen1DynamoDbTableMappings: [ { branchName: "sandbox", - modelTableNameMap: { + modelNameToTableNameMapping: { Post: "Post-xnibcobqircidcckd2zx2uzxgq-dev", Comment: "Comment-xnibcobqircidcckd2zx2uzxgq-dev", }, @@ -239,11 +239,11 @@ In order to provide a smoother experience with the migration tooling, we have ad For example, if you have a Node.js Lambda function in Gen 1, you will see the following error in your sandbox run: -```bash title="Terminal" showLineNumbers={false} +```bash title="Terminal" showLineNumbers={false} Source code for this function can be found in your Amplify Gen 1 Directory. See .amplify/migration/amplify/backend/function/app81ff331aPostConfirmation/src ``` -you will need to copy the code from your Gen 1 backend and make any necessary changes to the code such as updating to TypeScript and updating the import statements. +you will need to copy the code from your Gen 1 backend and make any necessary changes to the code such as updating to TypeScript and updating the import statements. **Note:** You will need to install the Lambda dependencies in the project root `package.json` file. @@ -369,7 +369,7 @@ Then redeploy the application by committing the changes to Git. ## Verify continuous deployment -After performing the post-migration tasks, commit your changes and allow your deployment pipeline to deploy changes without error. +After performing the post-migration tasks, commit your changes and allow your deployment pipeline to deploy changes without error. {/* what happens when you experience an error */} From 05d728f30507abb16219b8ed73d2442201564853 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Fri, 14 Mar 2025 10:23:57 -0600 Subject: [PATCH 2/2] use latest data snapshot --- src/pages/[platform]/start/migrate-to-gen2/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/[platform]/start/migrate-to-gen2/index.mdx b/src/pages/[platform]/start/migrate-to-gen2/index.mdx index 0b16d2667d4..4e6fad451b7 100644 --- a/src/pages/[platform]/start/migrate-to-gen2/index.mdx +++ b/src/pages/[platform]/start/migrate-to-gen2/index.mdx @@ -181,7 +181,7 @@ npm install For testing purposes, you will need to additionally install the tagged versions of the `@aws-amplify/backend` and `@aws-amplify/backend-data` packages. ```bash title="Terminal" showLineNumbers={false} -npm install @aws-amplify/backend@0.0.0-test-20250307211308 @aws-amplify/backend-data@0.0.0-test-20250307211308 +npm install @aws-amplify/backend@0.0.0-test-20250314161305 @aws-amplify/backend-data@0.0.0-test-20250314161305 ```