Deploy a Container Web App on Amazon Lightsail


Module 5: Clean Up Resources

In this module, you will clean up the resources that you deployed in previous modules


If you followed the steps of this tutorial to experiment with Lightsail, and not to deploy a production-ready service, it is important to delete all cloud-based resources that you created, to avoid incurring charges on your AWS account.

What you will accomplish

In this module, you will:
  • 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.


Delete the cloud-based infrastructure

Amazon Lightsail makes it easy to delete both your deployments and container service in just one command. 

Open your terminal and enter the following command.

Warning: This command deletes all deployment versions and the container service (the infrastructure) that was created to support them. There is no possibility to recover anything and the command does not ask for confirmation.

aws lightsail delete-container-service --region eu-west-3 --service-name signup-application

Verify no resources are left behind

To verify all resources have been deleted, enter the following command:

aws lightsail get-container-services --region eu-west-3

The command outputs a message, such as the following:

# aws lightsail get-container-services --region eu-west-3

    "containerServices": []


Congratulations! You have finished the Deploy a Container Web App on Amazon Lightsail tutorial. Continue your journey with AWS by following the Next steps section below.

Was this page helpful?

Next steps