amplify-cli: Export CDK doesn't work when stack contains imported auth
Before opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.18.0
Amplify CLI Version
7.6.19
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
Amplify Categories
auth
Amplify Commands
export
Describe the bug
When amplify backend stack contains imported auth (cognito user pool), amplify export command throws an error.
Expected behavior
CDK should be generated successfully.
Reproduction steps
- amplify init
- amplify import auth
- amplify export
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
โ Generating and writing root stack
Cannot read property 'parameters' of undefined
TypeError: Cannot read property 'parameters' of undefined
at ResourceExport.fixNestedStackParameters (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/resource-package/resource-export.ts:102:59)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/export-resources.ts:50:39)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at exportBackend (/usr/local/lib/node_modules/@aws-amplify/cli/src/commands/export.ts:74:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/commands/export.ts:62:5)
at Object.executeAmplifyCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/index.ts:373:5)
at executePluginModuleCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:178:3)
at executeCommand (/usr/local/lib/node_modules/@aws-amplify/cli/src/execution-manager.ts:30:5)
at Object.run (/usr/local/lib/node_modules/@aws-amplify/cli/src/index.ts:205:5)
Additional information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 16 (4 by maintainers)
Commits related to this issue
- fix: 'parameters' of undefined error when exporting with imported resources (#9772) — committed to joekiller/amplify-cli by joekiller a year ago
- fix: import auth export - keep overrides generated by push-resources/formNestedStack - remove unused AuthModeLastUpdated from export feat: include export push subcommand in help fix: let amplify-e... — committed to joekiller/amplify-cli by joekiller a year ago
- fix: import auth export - keep overrides generated by push-resources/formNestedStack - remove unused AuthModeLastUpdated from export feat: include export push subcommand in help fix: let amplify-exc... — committed to joekiller/amplify-cli by joekiller a year ago
- fix: 'parameters' of undefined error when exporting with imported resources (#9772) — committed to joekiller/amplify-cli by joekiller a year ago
Was anyone able to find a work-around for this issue? Iโve invested a lot of time on building my app using amplify, and canโt afford to abandon amplify altogether because of this ๐ฆ
Hi @josefaidt, do you have any news on this ? we are facing the same issue with amplify 10.3.0 and 10.3.1. The issue is that we cannot really understand what is going wrong as the message is not informative and there is no exhaustive documentation and troubleshooting about the export. Also, the diagnose --send-report stop before sending, that reduce drastically the help we can receive.
Still getting this error:
Could really use a better error message, updated documentation, or a workaround