Delete a Lightsail instance
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 attached to the deleted instance, such as static IPs and snapshots, continue to incur charges until you delete them.
Note
Deleted instances cannot be recovered. Create a snapshot of an instance before deleting if you might need the data in the instance at a later time. For more information, see Create a snapshot of your Linux or Unix instance or Create a snapshot of your Windows Server instance in.
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 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 tab, then choose Delete instance.
-
Choose Yes 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.
-
-
Open a Terminal or Command Prompt 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: