You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable to remove services just by providing their name to sls remove #2202
What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
If there is additional config how would it look
To remove a deployed service at the moment you need the serverless.yml file on your local system so you can run serverless remove. Over time different services might have been deployed into your infrastructure and its not possible to remove them easily through Cloudformation because the S3 buckets aren't empty. Thus we can add an option --service-name to the remove command that will skip the current serverless.yml config and simply remove the whole service.
Another option would be setting appropriate values on the S3 bucket CF deployment, so you can easily remove it through the CF UI (probably the even better solution)
Similar or dependent issues:
*
Additional Data
Reacted by Andrew McClenaghan, TATSUNO “Taz” Yasuhiro and Ashwin Vaswani
@nicka looks like a DeletionPolicy doesn't work here (which kind of sucks)
Note
For Amazon S3 buckets, you must delete all objects in the bucket for deletion to succeed.
While a Custom lambda would be a nice addition solution, imho we shouldn't add additional resources and code into users infrastructure if not absolutely necessary. I think simply being able to set a name on the service with --service-name would be the best solution and we can still introduce more in the future in case users want to have this feature (or it could be added through a plugin)
changed the title [-]Make it easier to remove services from CF that you don't have files for locally[/-][+]Enable to remove services just by providing their name to sls remove[/+]on Jul 22, 2020
Activity
nicka commentedon Sep 25, 2016
Are you thinking about the
DeletionPolicykey within CloudFormation for the S3 bucket?Bit more complex solution: Adding a Custom Lambda backed CF resource which would empty the bucket upon stack deletion.
flomotlik commentedon Sep 26, 2016
@nicka looks like a DeletionPolicy doesn't work here (which kind of sucks)
While a Custom lambda would be a nice addition solution, imho we shouldn't add additional resources and code into users infrastructure if not absolutely necessary. I think simply being able to set a name on the service with
--service-namewould be the best solution and we can still introduce more in the future in case users want to have this feature (or it could be added through a plugin)4 remaining items
[-]Make it easier to remove services from CF that you don't have files for locally[/-][+]Enable to remove services just by providing their name to sls remove[/+]medikoo commentedon Dec 7, 2021
It feels related to #8499 and I believe should be addressed in same context