Clean up

Delete every resource of this lab so that you stop paying for it. You can use the console or CloudShell.

Use the console

  1. Instances: for each instance (fcj-wordpress-2gb, fcj-prestashop, and fcj-wordpress if it still exists), open the actions menu (⋮) and choose Delete.

Delete an instance

  1. Confirm with Yes, delete. Alarms of an instance are deleted with it.

Confirm deletion

  1. Databases: open fcj-lightsail-db, choose the Delete tab, and delete the database. You do not need a final snapshot.

  2. Snapshots: delete fcj-wordpress-snap-1.

  3. Networking: delete the static IPs fcj-wordpress-ip and fcj-prestashop-ip. A static IP that is not attached is billed.

  4. Alarm notifications: if you added an email contact, delete it.

Use CloudShell

aws lightsail delete-instance --instance-name fcj-wordpress-2gb
aws lightsail delete-instance --instance-name fcj-prestashop
aws lightsail delete-instance --instance-name fcj-wordpress   # if you did not delete it in chapter 6
aws lightsail delete-relational-database --relational-database-name fcj-lightsail-db --skip-final-snapshot
aws lightsail delete-instance-snapshot --instance-snapshot-name fcj-wordpress-snap-1
aws lightsail release-static-ip --static-ip-name fcj-wordpress-ip
aws lightsail release-static-ip --static-ip-name fcj-prestashop-ip
rm -f lsssh.sh /tmp/ad.json /tmp/lskey /tmp/lskey-cert.pub

Check that nothing is left. Every command must return []:

aws lightsail get-instances --query 'instances[].name'
aws lightsail get-relational-databases --query 'relationalDatabases[].name'
aws lightsail get-static-ips --query 'staticIps[].name'
aws lightsail get-instance-snapshots --query 'instanceSnapshots[].name'
aws lightsail get-alarms --query 'alarms[].name'