Amplify-cli: Ability to delete a single resource (ideally by "resource name")

Created on 4 Nov 2019  路  4Comments  路  Source: aws-amplify/amplify-cli

Is your feature request related to a problem? Please describe.
I've just run amplify delete and deleted all resources in my environment (it did warn me)

Describe the solution you'd like
What i really would have liked to do was delete a single api-gateway or storage or lambda

Describe alternatives you've considered
I ran amplify delete, but this clearly isn't what I was looking for.

Additional context
I read the docs, but maybe I missed something?

Most helpful comment

@blomm You can just an amplify remove <category> followup by an amplify push to remove a specific resource from the cloud.

All 4 comments

@blomm You can just an amplify remove <category> followup by an amplify push to remove a specific resource from the cloud.

are you sure? it's not documented.
when you say category, do you mean 'api' or 'storage'? ideally it would prompt me which resource with the category to remove, so I don't have to remove the whole 'category'

... update: it's not in the cli docs: https://github.com/aws-amplify/amplify-cli
but it is mentioned in the getting started: https://aws-amplify.github.io/docs/js/start

... and it appears to be the whole category that you must delete :
"If you no longer want to use a service you can delete it with amplify remove {category-name}"

@blomm It asks you to remove a specific resource as a part of the workflow when you run ampllify remove <category>. Optionally you can run amplify remove <category> <resource-name>

thanks @kaustavghosh06, are you able to update the cli documentation to include this information, for others in the future?

Was this page helpful?
0 / 5 - 0 ratings