Cleaning Up Our Serverless Dicebot Deployment

Clean up the deployment#

Well that was exciting! As cool as dicebot is, we probably don't want it hanging around forever. The API we deployed is public - which is awesome for easy testing and integration - but it also means anyone could trigger it if they know the URL.. It's not a huge deal for this particular project - since there is no private data being shared and attackers don't really have much use for a dice rolling chat bot. Still, it's good practice not to leave public accessible endpoints lying around when not in use.

We'll learn more about authentication and ways to lock down your API Gateways for Lambda in upcoming chapters.

So, if we're done with dicebot, it's best to go ahead and remove the stack, and all AWS resources associated with it.

From our dicebot directory, we can delete the stack that we used to deploy this application with the command: aws cloudformation delete-stack --stack-name DicebotChap1

Start a new discussion. All notification go to the author.