Drupal on AWS Lightsail
Drupal on AWS Lightsail
This Terraform blueprint creates a simple Drupal deployment on Amazon Lightsail. Lightsail is tailored for users looking for a simplified and user-friendly experience. It offers pre-configured virtual private servers (VPS) with an easy-to-use management console, making it ideal for small sites.
Why use this Terraform blueprint?
- Launch a complete Drupal site with a single command in minutes.
- CDN accelerated content delivery reduces latency and secures your site with TSL.
- Cost-efficient way to run Drupal for small websites with a fixed monthly cost.
- Official Drupal distribution packaged by Bitnami for Amazon.
How to use this blueprint?
This blueprint contain full Terraform code, configuration files and documentation needed to deploy and maintain a Drupal site on AWS. You can use this blueprint as a turn-key solution for deploying Drupal into a new AWS account.
- Download the latest blueprint release.
- Configure deployment with
tfvars
file. Configuration parameters can be found in the Configuration section. - Run
terraform apply
.
Terraform structure and AWS resources
Terraform files are built using open-source Terraform modules such as CloudPosse.
It is importnat to note that this blueprint is not a Terraform module, rather it is a complete deployable stack.
Expand to see Terraform structure
cdn.tf
- Lightsail CDN configuration optimised for Drupalcert.tf
- Lightsail SSL Certificates for CDNdefault.auto.tfvars
- Default configuration parameters. Edit this file to adjust the blueprint configuration. See the complete list of the Configuration parameters.dns.tf
- Route53 DNS zone and recordsmain.tf
- Main Lightsail instance configurationoutputs.tf
- Output variablesprovider.tf
- Terraform AWS providers and aliasesvariables.tf
- Input variable declarationsversions.tf
- Terraform version requirements
For a full list of modules, see the Dependencies section of the Configuration document.
Architecture
This blueprint prioritizes simplicity and affordability of Amazon Lightsail.
Simplicity. Leveraging Lightsail's pre-configured options, the blueprint makes it easier to set up and manage Drupal websites without extensive technical knowledge.
Affordability. Lightsail provides predictable pricing with flat-rate plans, which usually are more cost-effective for small to medium-sized Drupal websites compared to the similar setup on the standard AWS infrastructure.
Architecture Components
Lightsail Isntance. Drupal is deployed on a Lightsail instance with pre-configured OS image that runs Drupal, Apache and MySQL packaged by Bitnami.
Lightsail CDN (Optional). CDN accelerates content delivery, reduces latency and secures your site by enforcing HTTPS. It is an optional component that can be enabled in the blueprint configuration.
Lightsail Certificate (Optional). This component provides SSL certificate for securing your site with HTTPS. The blueprint automatically provisions and configures the SSL certificate for the Lightsail CDN.
Lightsail DNS (Optional). The blueprint allows automatic Lightsail DNS configuration for the specified TLD. You can also use Route53 as an alternative for DNS management.
Maintenance
As a part of the blueprint package, you provided documentation and tools to help you maintain your Drupal site on AWS. Drupal maintenance covers the following topics:
- Updating Drupal
- Backup and restore procedures for Lightsail
- Remote access to Lightsail instance
- Using Drupal CLI (Drush) to manage Drupal
FAQ
How much does it cost to run Drupal on Amazon Lightsail?
The cost of running this blueprint on Amazon Lightsail depends on the Lightsail instance bundle and configured optional resources. Minimal recommended bundle for Drupal start from $7 per month. A more powerful Lightsail bundles can cost hundreds of dollars per month.
What is the difference between this Lightsail blueprint and blueprint for AWS ECS?
Lightsail simplifies management tasks and offers fixed monthly cost. However, it has limitations in scalability and customization, making it more suitable for smaller to medium-sized websites.
AWS ECS-based architecture leverages building blocks such as ECS, Aurora and CloudFront to provide greater flexibility, scalability, security and customization options. It allows users to fine-tune their cloud infrastructure to meet specific needs, making it ideal for advanced use cases.
If you require high-availability, scalability, better control and customisation, consider our Drupal on AWS ECS blueprint.
Unlike Lightsail, most of the standard AWS services have usage-based pricing. Therefore, while AWS ECS blueprint offers more customization, it's essential to monitor resource usage carefully to control costs effectively.
What is the difference between this blueprint and deploying Drupal on AWS Beanstalk?
AWS Beanstalk is a managed PaaS that abstracts away the underlying infrastructure. Unlike Lightsail, Beanstalk can automatically scale resources based on traffic and offers more control over the underlying infrastructure. Beanstalk pricing is based on the resources used, making it less affordable for smaller websites.
In many ways, a solution based on AWS Beanstalk would look similar to our AWS ECS blueprint and require other components such as CloudFront, Aurora, and EFS to work.
How often is this blueprint updated?
This blueprint is updated regularly to ensure it is compatible with the latest Terraform version, providers and modules.
What new features are planned for this blueprint?
We are currently working on adding the following features:
- Lightsail DNS (currently only Route53 is supported)
- Lightsail Snapshots