amplify-cli: Provide a verbose option to see reason for a failure
Is your feature request related to a problem? Please describe. The CLI sometimes displays an error and does not give enough information why. For example, just the phrase “Access Denied”
➜ directory-on-tap git:(master) ✗ amplify push --verbose
| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | ----------------- |
| Auth | dotauthdev | Delete | awscloudformation |
? Are you sure you want to continue? true
✖ An error occurred when pushing the resources to the cloud
Access Denied
or
✖ An error occurred when pushing the resources to the cloud
Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.
Describe the solution you’d like
I would like an option --verbose and -v which would display the operations which the CLI is performing on the server. With that information, I can diagnose what is the problem and then make changes to the CloudFormation document or User Policy.
Describe alternatives you’ve considered I’ve tried to guess what is wrong, but it’s a frustrating (and unsuccessful in my case) way of understanding what is going wrong.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 21
- Comments: 19 (3 by maintainers)
I’ve got this same issue. Is there no way to see verbose error message when running amplify commands? Adding a flag like
--verbosewould be greatly helpful when debugging issues.Is there any progress here… this is not useful:
@kaustavghosh06 Please can you explain what’s been done because I’m using “latest” and don’t see any improvement , e.g. a way to find out how to solve:
There is virtually nothing useful in this error message and, like so many, left now to spend hours performing digital autopsies.
Thanks
OK this should be fixed. Any self respecting CLI should have a --verbose option IMHO and this is the standard practice. Right now I am trying to recreate my APIs and amplify cli push is just sitting there and not going forward. I have no clue whatsoever on what is going on. @kaustavghosh06 ^^^
Ok I dont know if I should call this as Amplify’s hidden feature 😒
When I ran amplify api push instead of amplify push I got a much better error message:
✖ An error occurred when pushing the resources to the cloud
Attempting to edit the key schema of the VacationTable table in the Vacation stack. There was an error pushing the API resource Attempting to edit the key schema of the VacationTable table in the Vacation stack. Cause: Adding a primary @key directive to an existing @model. How to fix: Remove the @key directive or provide a name e.g @key(name: “ByStatus”, fields: [“status”]). ~