aws-amplify / aws-amplify/amplify-cli
Unable to update NoSQL storage
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [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.
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
16.14.2
### Amplify CLI Version
7.6.26
### 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.
No.
### Amplify Categories
storage
### Amplify Commands
update
### Describe the bug
Running update on NoSQL dbs in amplify storage throws the error `TypeError: Cannot convert undefined or null to object`. The issue may be that the tables were created to back the API via the CLI, but do not seem to be present in the storage category via the CLI (but are present when referring to them to be able to set permissions on a lambda function through the CLI).
### Expected behavior
You should be able to update NoSQL storage.
### Reproduction steps
1. Run `amplify update auth`
2. Select `NoSQL`
### GraphQL schema(s)
_No response_
### Log output
```
TypeError: Cannot convert undefined or null to object
at Function.keys ()
at updateWalkthrough (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\node_modules\@aws-amplify\amplify-category-storage\lib\provider-utils\awscloudformation\service-walkthroughs\dynamoDb-walkthrough.js:62:12)
at Object.updateResource (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\node_modules\@aws-amplify\amplify-category-storage\lib\provider-utils\awscloudformation\index.js:55:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.executeAmplifyCommand (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\node_modules\@aws-amplify\amplify-category-storage\lib\index.js:172:5)
at async executePluginModuleCommand (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\lib\execution-manager.js:164:5)
at async executeCommand (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\lib\execution-manager.js:35:9)
at async Object.run (C:\Users\*User*\AppData\Roaming\npm\node_modules\@aws-amplify\cli\lib\index.js:162:9)
```
### Additional information
_No response_
Contributor guide
Research direction
Start with amplify-category-storage/lib/provider-utils/awscloudformation/service-walkthroughs/dynamoDb-walkthrough.js at updateWalkthrough line 62, then follow the updateResource call in index.js. Reproduce the reported flow with amplify update auth and selecting NoSQL, checking how tables created through the API are represented. Done means updating NoSQL storage completes without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend, cli, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100