Amazon Lightsail.

I chose Amazon Lightsail as the hosting service for publishing the site I built with Drupal.

Amazon Web Service.

Amazon Web Service — commonly known as AWS — is a hosting service operated by Amazon, operating at global scale and used by everyone from large enterprises to individual developers.

It's highly flexible and offers an enormous range of services, which makes it hard to get a clear picture of the whole thing. Unless you're an engineer who works with internet infrastructure, figuring out which hosting plan to go with — let alone how to actually use it — can feel out of reach, and I imagine many people are curious but keep their distance.

I was also looking for a hosting service to run and publish Drupal on — ideally something affordable that I could use for both learning and running the site — and was looking at VPS options from domestic hosting companies.

Amazon Lightsail.

I'd originally been running WordPress and Drupal on shared hosting with Xserver, and was starting to run into its limitations, so I was considering moving to VPS as the next step. That's when I came across Lightsail as one of AWS's VPS-style services.

However, based on what I could find online, the hardware, OS, PHP, and DB versions were a bit dated, and it wasn't clear whether the conditions for running Drupal 11.x were met, so I hadn't seriously considered it at first.

One reason individual users in Japan — myself included — tend to shy away from AWS is that the documentation on how to use it, pricing, and specs is primarily in English, and there's limited Japanese documentation. What does exist tends to read like machine translation, which makes it hard to actually understand.

Then I found that Lightsail had partnered with Bitnami to offer packages that let you run a CMS with minimal friction, and one of those had a pre-configured environment with the latest version of Drupal installed. That's what made me decide to give it a try, and ultimately led me to choose Lightsail.

AWS.

Since Lightsail is one of AWS's services, you'll need an AWS account to use it.

Here's a rough overview of what I did to get Drupal installed and running on Lightsail.

1. Creating an AWS Account.

  1. Registering with AWS
  2. Creating a non-root IAM user with administrative privileges
  3. Re-logging in with the new user
  4. Verifying CloudShell
  5. Setting up and verifying SSH key authentication

2. Selecting Lightsail and Installing Drupal.

  1. Selecting Lightsail from the AWS console
  2. Choosing a service — selecting the Drupal "Apps + OS" package here
  3. Selecting server specs, configuration, and options from the Lightsail interface
  4. Installing once the specs are decided
  5. Drupal installation complete

3. Basic Drupal Configuration.

  1. Logging into Bitnami via the CloudShell console
  2. No root access, so running commands with sudo
  3. Checking the admin password for the installed Drupal instance
  4. Logging into the Drupal admin panel and configuring login credentials and passwords
  5. The Drupal instance on Lightsail uses a dynamic IP, so switching to a static IP
  6. With this done, SSH login to both Drupal and Bitnami becomes possible via the fixed static IP address.
  7. Likewise, accessing Drupal from a browser is now possible via the fixed static IP.
  8. Obtaining the SSH authentication key from the Drupal instance
  9. Verifying SSH login to Bitnami
  10. Completing basic Drupal configuration to prevent unauthorized access by third parties.

4. Domain Registration and DNS Configuration.

  1. Registering a domain with Route 53 and configuring DNS on the Drupal instance.
  2. Configuring SSL using mkcert from the Bitnami console
  3. Updating Drupal from 10.3.3 to 10.3.5
  4. Installing Bootstrap5 for use as the theme
  5. Tidying up the layout of the top page and other pages.
  6. Creating posts, taxonomies, and article summary pages with Views

5. Email Configuration and Domain Setup.

  1. Setting up an email account with the registered domain using Amazon WorkMail
  2. Adding email-related DNS records such as MX records using Amazon Simple Email Service
  3. Setting up reCAPTCHA as bot protection for the contact form

That's the overall flow that has brought the website build to where it stands today.

Documenting every step of this process in full would result in an enormous volume of content, and if I wrote it up half-heartedly it would be hard to follow. I've compiled the official AWS and Bitnami documentation for each step in the latter half of this article, so please refer to the official guides for details.

6. Running on Drupal 10.3.

I'm using the 'Apps + OS' package, where Bitnami handles the basic Apache and DB configuration and installs an optimized version of Drupal on Lightsail. At the time of writing, this package installs Drupal 10.3.x.

The PHP version is 8.2.x, which means Drupal 11.x can't be installed at this point. Since Drupal is packaged by Bitnami, I'll continue building the website on Drupal 10.3.x for now, until I've had a chance to verify the impact of a PHP version upgrade on Lightsail.

6-1.1 Free Plan.

AWS offers the EC2 t2.micro free for one year for testing and learning purposes. The Bitnami package for this plan includes Drupal 11.0.x. I considered starting with this, but since it's intended more for learning and testing, an EC2 upgrade would eventually be necessary.

Given that I was planning to publish a website and considering the expected traffic and content volume, t2.micro felt underpowered — something around t5 or t7 would be more appropriate — so I held off on using the free tier.

The free-tier instances provided by AWS are only available once per account registration.

6-2. Selecting the Apps + OS Plan.

Since this was my first time using AWS, I went with the Lightsail-standard option that's easy to understand: the Drupal setup available under Bitnami's 'Apps + OS' package, optimized for Lightsail. I selected the plan with 2 vCPUs, 2 GB of RAM in a dual configuration, and 60 GB of SSD storage, at $12/month.

I used the VPS service configurations and pricing offered by domestic hosting companies as a benchmark for selecting the hardware configuration on Lightsail.

This instance is also free for the first three months. I planned to finalize my configuration within that window.

7. Understanding AWS Systems and Terminology.

One thing that makes AWS harder to understand is that the terminology used for its features differs from what domestic hosting services use. I couldn't get my head around what 'instance' meant until I actually started using it, and it took me a while to understand what I'd actually need to do to install and use Drupal.

7-1. What Is an Instance?

According to AWS:


Cloud providers maintain hardware in data centers and provide virtual access to computing resources in the form of instances. Cloud instances can be used to run compute-intensive workloads such as containers, databases, microservices, and virtual machines.


That's the official explanation. Putting it in terms I can actually understand:


  1. Cloud services abstract away the hardware, which is why the term "virtual" comes up.
  2. That said, the hardware is still physically being used. What "abstracting the hardware" means here is really about ownership.
  3. AWS owns the physical hardware; users don't own it themselves.
  4. Users don't own the hardware — they borrow AWS's hardware to run their software.
  5. This is what "virtual" refers to.
  6. An instance is a unit of software functionality that runs on the cloud.
  7. Because it runs on the cloud, it's referred to as "virtual access."

In simple terms, an instance is a package of software functionality that runs on the cloud. AWS lets you combine these functional packages as needed to build not just websites, but whatever system you're aiming for.

For someone like me, coming from an older mindset, the mental model of a web server is one machine with Web, DB, and Mail functions all installed and running together. That way of thinking was holding me back from understanding how AWS is fundamentally structured, but actually using AWS this time has given me an "aha" moment — both in terms of how convenient it is and how far the technology has come.

As an aside, the counterpart to a virtual server is what's called an on-premises server — a dedicated, physical machine. Literally it would be something like "physical server" or "real server," but neither has much of a ring to it, which I imagine is why "on-premises" caught on. A slightly unnecessary tangent, I know.

7-2. Cloud service

This isn't unique to AWS — hosting services from major companies are now heavily cloud-based, and rather than loading all functions onto a single server as was once common, each function is separated onto its own dedicated server.

This makes it possible to build a far more flexible system than anything you could do with a single all-in-one server — you can scale up the instances handling heavy loads while keeping lighter functions on a smaller footprint. It also opens the door to more efficient cost management and flexible scaling under high traffic.

These granular, specialized, packaged units of functionality are what AWS calls instances.

7-3. Understanding the Core Concepts Needed to Use AWS

Once you understand what an instance is, the other core concepts you need to use AWS start to click into place — you begin to understand how the admin interface works and what configuration you'll need. AWS has an enormous number of instances available, and understanding how to identify and use the right ones is the foundational concept; it was my first step toward understanding AWS.

The content of this article is my own attempt to make sense of things, not the work of an expert, so there may be places where my interpretation differs from the official meaning. For the full details, please refer to the official AWS guides.

8. Misconceptions About AWS.

8-1. EC2 and RDS

One misconception I had about AWS was that in order to run Drupal, you'd need at minimum an 'EC2' instance to handle Drupal and Apache, and an 'RDS' instance to handle the database.

The problem with this assumed minimum setup was that RDS is a dedicated database system with advanced DB capabilities, which makes it overkill for small personal use — and expensive. Because RDS pricing is based on hardware specs, choosing something comparable to a VPS would run close to $100/month at minimum, which is steep for personal use.

8-2. EC2 and EBS

Lightsail and Amazon's one-year free tier avoid the cost of RDS by running the database on EC2 with EBS as the storage layer. My misconception was that you couldn't have DB functionality without RDS, meaning CMSes like Drupal simply wouldn't work — but Amazon does account for individual use, and has plans available to match different use cases and scales.

The Lightsail Bitnami package, configured along these lines, has more than enough specs to handle reasonable traffic for personal use or a small website.

The Lightsail package I chose comes with everything a CMS like Drupal needs, so I'll keep using it for a while — running on 10.x until I've had a chance to verify the impact of any OS or PHP updates, and then considering an upgrade to 11.x after that verification.

9. Installing and Configuring Instances and Services.

  1. Lightsail Drupal Bitnami -> Drupal
  2. Route 53 -> Domain registration
  3. Amazon WorkMail -> Email account registration / management
  4. Amazon Simple Email Service -> Email delivery service

Drupal settings, as well as DB and Apache configuration, can all be done by logging into Bitnami.

Route 53 is used for domain registration, with DNS managed through Lightsail.

Amazon WorkMail is a mail client service similar to Gmail or Microsoft 365 Outlook.

Amazon Simple Email Service is used as the SMTP for configuring and managing outgoing mail from Drupal.


Below are links to the official guides for the instances and services I installed.

AWS Official Guide

AWS Account

 Official User Guide / English

Covers everything from account creation to security policies and managing IAM users. Credit card information is registered here, and billing is managed here as well.


Amazon Lightsail

Official User Guide

Lightsail management and Drupal installation and configuration are all done here.


Lightsail Drupal

Official User Guide

Covers everything from installation to configuration. The Bitnami usage guide is also explained here.


Bitnami Package for Drupal for AWS Cloud

Bitnami Drupal Official Guide / English

Used for configuring console login, SSH login, and SSL, as well as installing themes and modules using Composer and Drush. Since there's no root access, everything is installed with sudo.


Route53

Official User Guide / English

Used for domain registration. AWS services typically manage DNS here, but since I'm using Lightsail, DNS is managed through the Lightsail instance.


Amazon WorkMail

Official User Guide / English

Used for setting up email accounts for the registered domain and as a mail client.


Amazon Simple Email Service

Official User Guide / English

Used for configuring sending and receiving email for the registered address.

10. Configuration Summary.

  1. AWS account creation -> Billing and user management
  2. IAM execution user setup -> Installing and configuring each instance
  3. Drupal installation and configuration -> Configured via Bitnami
  4. Domain registration and assignment -> Domain registered with Route 53, DNS managed through the Lightsail instance
  5. Amazon WorkMail -> Email account creation and use as a mail client
  6. Amazon Simple Email Service -> Configuring sending and receiving for the registered email
  7. Building the website with Drupal

That's the process for completing the basic setup needed to use Drupal on Lightsail and publish the website.

This was my first time signing up for AWS and trying out Lightsail, and it turned out to be simpler than expected — once you get used to it, it's a genuinely convenient service. Written out, it becomes a long article, but each individual step isn't as daunting as the writing makes it sound. If you work through the guides carefully and take the time to understand the configuration, even a beginner like me can get a website published.

I used to wonder what AWS actually was, but the short answer is: a cloud service that takes large-scale functionality, breaks it down into specialized pieces, and strengthens each one separately. Lightsail is a packaged solution, so it has a significant pricing advantage over combining multiple specialized, high-spec instances.

This article is essentially a quick rundown of each step in list form.

From the next article onward, I'll be covering each process in chronological order, in as clear a format as I can manage.

Conclude.

This article has been a quick run through the process of choosing AWS Lightsail as the hosting service, installing Drupal, registering a new domain, and publishing the website. I think each section could benefit from more detailed explanation, so from the next article onward I'll cover each step in order.

Next article

AWS Registration and IAM Setup.

The next article covers signing up for AWS and setting up a separate IAM account to use. I didn't understand what IAM was at the start, so I'll also be explaining why it's necessary and how it works.

Last update
Contributor
S.Takeda
Article
Tag

Powered by Drupal 11.4.2 and Bootstrap 5.0.4

Published AWS Jamstack by Drupal