diff --git a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts index 7e5e57de5d..442a24df25 100644 --- a/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts +++ b/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts @@ -333,11 +333,12 @@ export class ModelTransformer extends TransformerModelBase implements Transforme ddbDatasources.forEach(([modelName, datasource]) => { if (datasource.ds.dynamoDbConfig && !cdk.isResolvableObject(datasource.ds.dynamoDbConfig)) { dataSourceMapping[modelName] = datasource.ds.dynamoDbConfig.tableName; + } else { + // TODO: probably need a link to docs for this + console.warn( + `Could not resolve table name for ${modelName}. DataSourceMappingOutput is incomplete. Please manually add ${modelName} to the mapping for your migration.`, + ); } - // TODO: probably need a link to docs for this - console.warn( - `Could not resolve table name for ${modelName}. DataSourceMappingOutput is incomplete. Please manually add ${modelName} to the mapping for your migration.`, - ); }); }); if (context.transformParameters.enableGen2Migration && context.transformParameters.enableTransformerCfnOutputs) {