How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v24.19.0
Amplify CLI Version
14.5.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
I am migrating an existing Amplify Gen 1 backend to Gen 2.
The migration assessment succeeds, but amplify gen2-migration lock
fails during planning with:
→ Planning failed
Unable to find nested stack logical id prefix: AmplifyDataStore
--skip-validations fails with the same planning error:
amplify gen2-migration lock --skip-validations
The API currently has DataStore conflict detection disabled.
amplify update api reports:
Conflict detection (required for DataStore)
The API's cli-inputs.json contains:
"conflictResolution": {
"defaultResolutionStrategy": {
"type": "NONE"
}
}
However, running a fresh:
amplify api gql-compile
still generates these resources directly in the API CloudFormation
template:
- DataStore (AWS::DynamoDB::Table)
- AmplifyDataStoreIAMRole8DE05A49 (AWS::IAM::Role)
The deployed API nested stack also contains these resources directly:
LogicalResourceId: AmplifyDataStoreIAMRole8DE05A49
ResourceType: AWS::IAM::Role
LogicalResourceId: DataStore
ResourceType: AWS::DynamoDB::Table
There is NOT an AWS::CloudFormation::Stack resource whose logical ID
begins with AmplifyDataStore.
It appears that gen2-migration lock expects AmplifyDataStore to be a
nested CloudFormation stack, but this older Gen 1 backend has the
DataStore resources directly inside the API nested stack.
Migration assessment:
api / AppSync / FinalScore
Generate: supported
Refactor: not needed
auth / Cognito / FinalScore
Generate: supported
Refactor: supported
function / Lambda / answerReceived
Generate: requires adding code after generate
Advanced feature:
conflict-resolution
"conflict resolution (DataStore) is not supported in Gen2"
The actual conflict resolution setting is NONE / Disabled.
This migration was first tested successfully using a cloned Gen 1
environment created with amplify env add, following the recommended
migration workflow. The issue occurs when migrating the original
environment.
Is this API/DataStore CloudFormation layout supported by
gen2-migration lock?
Is there a supported way to migrate this backend without manually
altering/deleting the DataStore table or IAM role?
Expected behavior
migration would pass successfully
Reproduction steps
I do not expect running these exact steps in an empty directory will demonstate this behavior.
Project Identifier
16e60365e8d51c9d6921db8d2d9163b5
Log output
Details
# Put your logs below this line
amplify gen2-migration lock --skip-validations
⚠️ WARNING: AWS Amplify Gen 1 CLI is in maintenance mode and will reach end of life on May 1, 2027.
During maintenance mode, only critical bug fixes and security patches will be provided.
Migrate to Amplify Gen 2: https://docs.amplify.aws/react/start/migrate-to-gen2/
→ Planning failed
🛑 Unable to find nested stack logical id prefix: AmplifyDataStore
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Additional information
No response
Before submitting, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v24.19.0
Amplify CLI Version
14.5.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
I am migrating an existing Amplify Gen 1 backend to Gen 2.
The migration assessment succeeds, but
amplify gen2-migration lockfails during planning with:
→ Planning failed
Unable to find nested stack logical id prefix: AmplifyDataStore
--skip-validationsfails with the same planning error:amplify gen2-migration lock --skip-validations
The API currently has DataStore conflict detection disabled.
amplify update apireports:Conflict detection (required for DataStore)
The API's cli-inputs.json contains:
"conflictResolution": {
"defaultResolutionStrategy": {
"type": "NONE"
}
}
However, running a fresh:
amplify api gql-compile
still generates these resources directly in the API CloudFormation
template:
The deployed API nested stack also contains these resources directly:
LogicalResourceId: AmplifyDataStoreIAMRole8DE05A49
ResourceType: AWS::IAM::Role
LogicalResourceId: DataStore
ResourceType: AWS::DynamoDB::Table
There is NOT an AWS::CloudFormation::Stack resource whose logical ID
begins with AmplifyDataStore.
It appears that
gen2-migration lockexpects AmplifyDataStore to be anested CloudFormation stack, but this older Gen 1 backend has the
DataStore resources directly inside the API nested stack.
Migration assessment:
api / AppSync / FinalScore
Generate: supported
Refactor: not needed
auth / Cognito / FinalScore
Generate: supported
Refactor: supported
function / Lambda / answerReceived
Generate: requires adding code after generate
Advanced feature:
conflict-resolution
"conflict resolution (DataStore) is not supported in Gen2"
The actual conflict resolution setting is NONE / Disabled.
This migration was first tested successfully using a cloned Gen 1
environment created with
amplify env add, following the recommendedmigration workflow. The issue occurs when migrating the original
environment.
Is this API/DataStore CloudFormation layout supported by
gen2-migration lock?Is there a supported way to migrate this backend without manually
altering/deleting the DataStore table or IAM role?
Expected behavior
migration would pass successfully
Reproduction steps
I do not expect running these exact steps in an empty directory will demonstate this behavior.
Project Identifier
16e60365e8d51c9d6921db8d2d9163b5
Log output
Details
Additional information
No response
Before submitting, please confirm: