SLS Remove from outside original working directory?

I am using cicd to deploy a stack to aws through CodePipeline and CodeBuild. SLS deploys in this context and I have got as far as running unit and integration tests before running SLS remove and then closing the Pipeline.

Obviously I now want to deploy into a QA environment, and leave the stack up for some soak tests outside the pipeline. So how do I remove the stack after QA testing when the Pipeline assets no longer exist?

The original working directory is destroyed so how do I do an SLS remove??

1 Like

Nobody? Ok, so I ran a trivial trial. Stack with one lambda fn deployed from a dir from which I created an aws template.

I then copied the serverless.yml file into a random dir and did an sls remove. Worked fine.

I also hacked the copy of the yaml file around a couple of times ultimately just leaving the service name and provider details and again it worked fine.

Limited example so a bit wary of how far that result can be extended, but the docs are misleading when they say the stack needs to be removed from the working directory.

1 Like