‹ Return to How tos

Deleting an Amazon Lightsail instance

Last updated: May 31, 2018

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/Unix-based instance in Lightsail or Creating a snapshot of your Windows Server instance in Amazon Lightsail.

Delete an instance from the Lightsail console home page

  1. Sign in to the Lightsail console.

  2. For the instance you want to delete, choose the actions menu icon (⋮), then choose Delete.

    Delete an instance from the Lightsail console home page.
  3. Choose Yes to confirm the deletion.

Delete an instance from the Lightsail console instance management page

  1. In the Lightsail console on the home page, choose the instance you want to delete.

  2. Choose the Delete tab, then choose Delete instance.

    Delete an instance from the Lightsail console instance management
 page.
  3. Choose Yes to confirm the deletion.

Delete an instance using the AWS CLI

  1. Complete the following prerequisites if you haven't already:

    1. Install the AWS CLI. For more information, see Installing the AWS CLI .

    2. Configure the AWS CLI. For more information, see Configuring the AWS CLI.

  2. 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:

    AWS CLI output for Lightsail get-instances operation.
  3. 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.

  4. Type the following command to delete the instance, and paste the name of the instance you want to delete in place of InstanceName.

    aws lightsail delete-instance --instance-name InstanceName

    If the deletion is successful, you should see a confirmation similar to the following:

    AWS CLI output for Lightsail delete-instance operation.

    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: