Aws-sam-cli: Feature Request: 'undeploy' CLI option

Created on 16 Nov 2018  路  8Comments  路  Source: aws/aws-sam-cli

Description:

(Am new to SAM, so this hopefully this makes sense!)

How about an undeploy or delete CLI option to delete an already deployed app/stack. Since the deploy is an alias to aws cloudformation deploy, couldn't there be a delete option that is an alias of aws cloudformation delete-stack?
Thanks!

Potential Workflow:

cd <app-dir>
sam undeploy OR sam delete

Observed result:
Success. Your app (<name of your app>) has been deleted.
OR
Failed. <error message>

Expected result:
Deletes your deployed app.


_Note to the maintainers: Although the How to Contribute doc says to add the feature-request label, I did not appear to have the permissions to do so._

stagpm-review typfeature

Most helpful comment

Thumbs up for this one!

All 8 comments

Thanks for the feature request! This is a SAM CLI feature request, so transferring to that GH repo.

i consider the inability to undeploy potentially defective code to be a fairly significant security risk

deploying over it may not be an option (cloudfront has a tendency to get wedged under sls)

is there an eta for this?

you can just use the aws cli. not as convenient, but not a critical issue

aws cloudformation delete-stack --stack-name xyz

This would be a good feature to have, I would be up for using the sam cli if cleaning up the resources is easier.

Will this include the deletion of the artifact S3 bucket if it was created by sam deploy?
That would be my expectation...

agreed, this is definitely needed

Adding my 馃憤 to this. Especially for wooing Serverless Framework users over, this will be important - we're used to sls deploy and sls remove

Thumbs up for this one!

Was this page helpful?
0 / 5 - 0 ratings