AWS CDK v1 to v2 migration
AWS Cloud Development Kit (CDK) version 1 that Amplify CLI uses under the hood has entered maintenance on June 1, 2022 with end of support date scheduled on June 1, 2023. Amplify CLI v11 and above uses CDK v2 to help you move away from deprecated CDK as well as unblock new features that won’t be added to version 1 of CDK. To learn more about AWS CDK Migration, visit Migrating to V2
When to migrate
During deployment, Amplify CLI searches for AWS CDK v1 dependencies in your project and if found, Amplify CLI prints a warning to migrate to AWS CDK v2.
We detect you are using CDK v1 with custom stacks and overrides. AWS CDK v1 has entered maintenance mode on June 1, 2022
Impacted files. - amplify/backend/package.json Upgrade '@aws-amplify/cli-extensibility-helper' to latest version ^3.0.0 - amplify/backend/custom/<resource-name1>/package.json - amplify/backend/custom/<resource-name2>/package.json
Follow this guide here: https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.htmlHow do I migrate?
If an Amplify project using amplify override <category> or amplify add custom was deployed with an Amplify CLI version prior to 11.0.0, then you need to follow the steps below to migrate:
-
For projects using
amplify overrides <category>: Upgrade@aws-amplify/cli-extensibility-helperto version^3.0.0inamplify/backend/package.json -
For projects using
amplify add custom: Updatepackage.jsonforcustomcategories inamplify/backend/custom/<custom-resource-name>/package.jsonas shown below:And update
amplify/backend/custom/<custom-resource-name>/cdk-stack.tsforcustomcategories as shown below: