Deploy a LAMP Web App on Amazon Lightsail
TUTORIAL
Module 2: Clean Up Resources
In this module, you will clean up the resources that you deployed in previous modules
Overview
If you followed the steps of this guide to experiment with Lightsail, and not to deploy a production-ready service, it is important to delete all cloud-based resources that you created. This will help you to avoid incurring charges on your AWS account.
What you will accomplish
- clean up all resources used by an Amazon Lightsail deployment.
Minimum time to complete
< 2 minutes
Module prerequisites
- AWS Account with administrator-level access**
- Recommended browser: The latest version of Chrome or Firefox
[**]Accounts created within the past 24 hours might not yet have access to the services required for this tutorial.
Implementation
Delete the cloud-based infrastructure
Amazon Lightsail makes it easy to delete your infrastructure with just one command.
Open your terminal and type the following command:
aws lightsail delete-instance --instance-name LightsailLampExample
Now to delete your SSH key pair, use this command:
aws lightsail delete-key-pair --key-pair-name LightsailGuide
Verify no resources are left behind
To verify all resources have been deleted, open a terminal and enter the following command:
aws lightsail get-instances
# the command should output the following
{
"instances": []
}
Conclusion
Congratulations! You have finished the Deploy a LAMP Web Application on Amazon Lightsail tutorial. Continue your journey with AWS by following the Next steps section.