Unable to add a Lambda Trigger using CLI
Describe the bug
When trying to add a Lambda trigger using amplify add function the process fails at this step Do you want to edit the local lambda function now? (Y/n)
Amplify CLI Version 4.17.1
To Reproduce
- Run
amplify add function - Select Lambda Trigger for function type.
- Select Amazon DynamoDB Stream
4 Select
Use API category graphql @model backed DynamoDB table(s) in the current Amplify projectas DynamoDB event source.
Expected behavior A lambda function should have been created.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10
- Node Version. 12.14.0
@varunpsr part of this issue is fixed in the latest version of the CLI (4.18.1). There is another known issue that is fixed by #3990 that will land in an upcoming release of the CLI. Until then, you can update to the latest version of the CLI and select 'No' when asked if you want to edit the file now, then manually navigate to the function folder and edit the index.js file there.
@varunpsr This is now fixed in the latest version of the CLI (4.19.0)
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.