table name should be passed
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
24.11.1
Amplify CLI Version
14.2.0
What operating system are you using?
Windows 11
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
schema changes, added new GSI or @key in a dynamodb table
Describe the bug
? Do you want to update code for your updated GraphQL API Yes ? Do you want to generate GraphQL statements (queries, mutations and subscriptio n) based on your schema types? This will overwrite your current graphql queries, mutations and subscriptions Ye s
🛑 table name should be passed
$ amplify diagnose --send-report
Learn more at https://docs.amplify.aws/cli/reference/diagnose/
✅ Report saved: C:\Users\hlagu\AppData\Local\Temp\qcetna\report-1764215054179.zip
√ Done
Project Identifier: 12784402284820b8e646e2c21d0eba2d Session Identifier: 96e700fe-8209-41e6-abbb-8088faeedd39
Expected behavior
amplify push api will be successful
Reproduction steps
add a new key in an existing table or type in the schema with an existing key already
Project Identifier
12784402284820b8e646e2c21d0eba2d
Log output
# Put your logs below this line
2025-11-27T03:37:36.083Z|info : amplify-provider-awscloudformation.aws-s3.uploadFile.s3.upload([{"Key":"[***]ify-[***]ync-[***]es/[***]67c607a5146bc3a8/[***]vers/[***]dEligibility.req.vtl","Body":{"fd":null,"path":"C:\\Users\\hlagu\\OneDrive\\Documents\\GitHub\\hris-main-app\\amplify\\backend\\api\\qcetna\\build\\resolvers\\Mutation.createPMISEmployeeOldEligibility.req.vtl","flags":"r","mode":438,"end":null,"bytesRead":0,"_events":{},"_readableState":{"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null},"_eventsCount":1},"Bucket":"[***]ify-[***]tna-[***]od-[***]17-[***]ment"}])
2025-11-27T03:37:36.084Z|info : amplify-provider-awscloudformation.upload-appsync-manager.deploy([{"spinner":"Deploying (2 of 5)"}])
2025-11-27T03:39:49.332Z|error : table name should be passed
UnknownNodeJSFault: table name should be passed
2025-11-27T03:41:54.752Z|info : amplify version core
2025-11-27T03:44:14.023Z|info : amplify diagnose core {"send-report":true,"yes":false}
2025-11-27T03:44:14.071Z|info : @aws-amplify/amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
Additional information
No response
Before submitting, please confirm:
- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [x] I have removed any sensitive information from my code snippets and submission.
Hi @hlagunsadxSparksoft,
Thank you for reporting this issue. Based on analysis of the Amplify CLI source code, the error "table name should be passed" occurs due to a bug in how the GraphQL resource manager populates table names during iterative GSI deployments.
Root Cause:
The issue seems to be in the amplify-graphql-resource-manager.ts file where table names are collected for deployment steps:
https://github.com/aws-amplify/amplify-cli/blob/1a9dae6c3c8fbeb3cbd845b121af30c08c2a741b/packages/amplify-provider-awscloudformation/src/graphql-resource-manager/amplify-graphql-resource-manager.ts#L190-L195
When tableNameMap.get(stackName) returns undefined (because the stack name isn't found in the map), this undefined value gets added to the tableNames array. Later, when the deployment manager tries to wait for these tables to be ready, it calls getTableStatus(undefined), which triggers the assertion failure.
Why This Happens:
This appears to occur when adding @key directives to existing tables because the table name mapping may not be properly populated for all nested stacks during the GSI update process.
Important Note:
AWS recommends using Amplify Gen 2 for new projects. Gen 2 features a TypeScript-based configuration approach with improved developer experience. You can learn more at: https://docs.amplify.aws/react/start/quickstart/