Delete Lightsail instances
If you no longer need an instance, you can delete it using the Amazon Lightsail console or the AWS Command Line Interface (AWS CLI). You stop incurring charges for the instance as soon as it’s deleted. However, resources that were attached to the deleted instance will continue to incur charges until you delete them as well. For more information on these resources and how to delete them after deleting your instance, see Next steps.
Warning
When you delete an instance, it can't be recovered. Any automatic snapshots of the instance will also be deleted as part of this operation. If you want to retain your data for later use, you must first create a snapshot of your instance or choose to keep an existing automatic snapshot. For more information, see the following documentation:
Delete an instance from the Lightsail console home page
-
Sign in to the Lightsail console
. -
For the instance you want to delete, choose the actions menu icon (⋮), then choose Delete.
-
Choose Yes, delete to confirm the deletion.
Delete an instance from the Lightsail console instance management page
-
In the Lightsail console on the home page, choose the instance you want to delete.
-
Choose the Delete button, then choose Delete instance.
-
Select the checkbox, then enter Confirm into the input field to acknowledge that you want to delete the instance.
-
Choose Delete instance to confirm the deletion.
Delete an instance using the AWS CLI
-
Complete the following prerequisites if you haven't already.
-
Install the AWS CLI. For more information, see Install the AWS CLI .
-
Configure the AWS CLI. For more information, see Configuring the AWS CLI.
-
(Optional) Use AWS CloudShell. For more information, see Manage Lightsail resources with AWS CloudShell.
-
-
Open a Terminal, Command Prompt, or CloudShell window, then type the following command to get the name of the instance you want to delete:
aws lightsail get-instances
You should see results similar to the following:
-
Select and copy the name of the instance you want to delete so you can use it in the next step.
Note
If the instance you want to delete does not appear, confirm that your AWS CLI is configured for the AWS Region where the instance is located. For more information, see Configuring the AWS CLI.
-
Type the following command to delete the instance.
aws lightsail delete-instance --instance-name
InstanceName
In the command, replace
InstanceName
with the name of the instance.If the deletion is successful, you should see a confirmation similar to the following:
Note
If the deletion isn’t successful, you should see an error message. Confirm that you copied and pasted the exact name of the instance and try again.
Next steps
After you delete an instance, a static IP, snapshots, block storage disks, and load balancer associated to an instance remain in Lightsail, and incur additional charges. For more information about how to delete those resources, see the following articles: