aws-templateslamp-production-ready

Delete a LAMP Production-Ready packaged by Bitnami deployment on AWS

: This guide assumes that you have already deployed a LAMP Production-Ready packaged by Bitnami solution on AWS.

Take the following considerations into account when deleting your LAMP Production-Ready packaged by Bitnami CloudFormation stack:

  • Before deleting your LAMP Production-Ready deployment:
    • Back up your data
  • After deleting your LAMP Production-Ready deployment:
    • Remove the associated Route53 hosted zone (optional)
    • Remove the associated SSL certificate (optional)

The following sections will walk you through the necessary steps.

Pre-deletion operations

Back up your data

Before deleting your LAMP Production-Ready packaged by Bitnami deployment, it’s recommended that you create backups of your database and application files to avoid data loss.

To backup your database and application files, use the backup tools offered by AWS.

Use AWS backup tools

The LAMP Production-Ready packaged by Bitnami database is stored in an Amazon Aurora database while the LAMP Production-Ready packaged by Bitnami files are stored and shared across the LAMP Production-Ready packaged by Bitnami instances using a shared file system (Amazon EFS). Therefore, to back up your data, it is necessary to separately back up the database and the shared file system.

Create an Amazon Aurora database snapshot

By default, Amazon RDS snapshots are done periodically depending on the Amazon RDS (Aurora) configuration parameters defined when deploying the CloudFormation template. You can access the database snapshots from the Amazon RDS console.

To force a database snapshot before deleting your solution, follow these steps:

  • Browse to the Amazon RDS console

  • Choose the primary instance (with role “Writer”) for the Aurora database cluster.

  • Select the “Actions -> Take snapshot” menu item.

    Aurora force snapshot

  • In the “Take DB Snapshot” dialog, enter a name for the snapshot in the “Snapshot Name” field and click the “Take Snapshot” button.

    Aurora force snapshot

A snapshot of the database will now be created and saved.

Create an EFS file system backup

In this solution, the following content is stored in the shared file system:

  • Apache configuration files
  • PHP configuration files

AWS offers two different solutions for EFS backup: the AWS Backup service and the EFS-to-EFS backup solution. Refer to the AWS EFS backup documentation for detailed information and instructions.

Deletion

Delete a LAMP Production-Ready packaged by Bitnami deployment from the CloudFormation console, as follows:

Amazon Web Services will now begin the deletion process. This process may take some time, but you can use the CloudFormation dashboard to periodically check the status of the deletion.

Check deletion status

Post-deletion operations

Remove the Route53 hosted zone (optional)

: This section assumes that you created a hosted zone when launching LAMP Production-Ready packaged by Bitnami as described in this tutorial.

Once you delete your LAMP Production-Ready packaged by Bitnami deployment, you should delete the Route53 hosted zone created to manage the domain name for your LAMP Production-Ready packaged by Bitnami site, as follows:

  • Access the Route53 console and select the hosted zone associated to your domain.

  • Click the “Delete Hosted Zone” button.

    Delete Hosted Zone

  • A confirmation message will be displayed. Review it and click the “Confirm” button.

    Delete Hosted Zone

Your hosted zone will now be deleted.

Remove the SSL certificate (optional)

: This section assumes that you set a domain name in the “DNS and SSL configuration” section when launching LAMP Production-Ready packaged by Bitnami as described in this tutorial.

This solution uses an AWS Lambda function to automatically create an SSL certificate for the indicated domain name. Once you delete your LAMP Production-Ready packaged by Bitnami deployment, you should delete the SSL certificate by following the steps below:

Your SSL certificate will now be deleted.

Last modification July 25, 2019