#C04 Amazon Lightsail.

We chose Amazon Lightsail as our hosting service for public release.

Amazon Web Service.

Amazon Web Service, commonly known as AWS, is a hosting service operated by Amazon that is expanding its services on a global scale and is used by everyone from large companies to individuals.

Because it offers a very flexible and wide-ranging service, it is difficult to grasp the full picture, and unless you are an engineer involved in internet infrastructure, it is difficult to select the hosting plan you want or to imagine how to use it in practice.

I was also considering a VPS service provided by a domestic hosting company, as a hosting service that would allow me to run and publish Drupal without spending too much money, and also as a way to learn and manage the site.

Amazon Lightsail.

Originally, I was running WordPress and Drupal on Xserver's shared hosting, but as there were some functional limitations, I considered using a VPS as the next step, and as one option, I learned that there was a VPS service called Lightsail from AWS.

However, when I looked at the information on the website, the hardware, OS, PHP and DB versions were a little old, and the conditions for running Drupal 11.x, which was my objective, were a little iffy, so I didn't consider it as a potential option.

The reason why, including myself, individual users in Japan don't use AWS very much is that the explanations of how to use it, the fees, and the explanations related to the specifications are all in English, and there are no Japanese manuals, and even if there are, they are written in a way that is difficult to understand, as if they were direct translations from translation software.

In this situation, Lightsail has partnered with Bitnami to provide a package that allows you to run a simple CMS, and I found an environment that installs the latest version of Drupal, so I decided to use this and chose Lightsail this time.

AWS.

As Lightsail is also one of the AWS services, you will need to create an AWS account in order to use it.

We will go through the process of installing and running Drupal on Lightsail.

1.Create an AWS account.
  1. Registering with AWS
  2. Creating a non-root user with root privileges using I AM
  3. Re-logging in as the non-root user
  4. Checking Cloud Shell
  5. Preparing and checking key authentication for SSH
2.Installing Lightsail and Drupal.
  1. Select Lightsail from the AWS console
  2. Select a service - here, select Drupal, which is a package that includes both an app and an OS
  3. From the Lightsail screen, select the server specifications, configuration and options
  4. Once the specifications are decided, install
  5. Drupal installation is complete
3.Drupal basic settings.
  1. Log in to Bitnami from the Cloud Shell console
  2. As you don't have root privileges, use sudo to process commands
  3. Check the password for the Drupal admin screen that has been installed
  4. Log in to the Drupal admin screen, and set the login name, password, etc.
  5. As the Drupal installed on Lightsail has a dynamic IP, change it to a static IP
  6. With this, you will be able to log in to Drupal and Bitnami via SSH using a fixed static IP address
  7. Similarly, you will also be able to access Drupal from your browser using the fixed static IP address.
  8. Obtain the SSH authentication key from the Drupal instance
  9. Confirm Bitnami SSH login
  10. Perform the basic Drupal settings so that it cannot be used by third parties without permission.
4.Domain Name Registration and DNS Settings.
  1. Obtain a domain on Route53 and set up DNS for the Drupal instance.
  2. Use mkcert from the Bitnami console to set up SSL
  3. Update Drupal from 10.3.3 to 10.3.5
  4. Install Bootstrap 5, which will be used for the theme
  5. Format the top page and other pages
  6. Create article, taxonomy and Views summary pages
5.Email settings for domains.
  1. Use Amazon Work Mail to set up a mail account with your domain name
  2. Use Amazon Simple Email Service to add mail-related records such as MX records to your DNS
  3. Use form mail, so set up reCAPTCHA to prevent bots

The above is the current state of progress in building the website.

If I were to write an article covering all the processes so far, it would be quite a long article, and even if I wrote it halfway, it would be a difficult article to understand. I will summarise the explanations of each function by AWS and Bitnami that I referred to in each process in the latter half of the article, so please refer to the official guides for details.

6.System Configuration.

We are using a ‘package of apps and OS’ that Bitnami has created by setting up the basic settings for Apache and DB, and installing optimised Drupal on Lightsail. This package currently installs Drupal 10.3.x.

If you look at the PHP version, it's 8.2.x, so you can't currently install Drupal 11.x. Since Drupal is packaged by Bitnami, we will continue to build websites with Drupal 10.3.x for the time being until we have verified the impact of upgrading the PHP version on Lightsail.

6-1.1 year free plan.

AWS provides EC2 t2micro for free for one year for testing and learning. Bitnami's package includes Drupal 11.0.x for this plan. At first I thought about choosing this, but since this plan is more for learning and testing, you will need to upgrade your EC2 later.

If you are thinking of publishing a website and considering the volume of traffic and articles, I think it is better to choose t5 or t7 and install it, so I am refraining from using the free version.

The free instances provided by AWS can only be used once after registering for an account.

6-2.App and OS package.

As this is the first time I'm using AWS, I've chosen the $12/month plan with a dual configuration of 2vCPU and 2GB memory, and a storage configuration of 60GB SSD, using the Drupal ‘app and OS’ that Bitnami has optimised for Lightsail, which is provided as standard with Lightsail and is easy to understand.

The hardware configuration we selected for Lightsail was based on the VPS service configuration and pricing provided by a company that offers hosting services in Japan.

You can also use this instance for free for three months. You can decide on the specifications during this three-month period.

7.Understanding AWS Terms and Systems.

One of the things that makes AWS difficult to understand is that the terminology used for the functions used within AWS differs from that used by domestic hosting services. I also didn't understand the meaning of the term ‘instance’ until I started using it, and it took me a while to figure out what I needed to do to install and use Drupal.

7-1.Instance

According to the AWS description,


Cloud providers maintain hardware in data centres and provide virtual access to computing resources in the form of instances. You can use cloud instances to run computing-intensive workloads such as containers, databases, microservices, and virtual machines.


. If you interpret it in a way that you can understand for yourself,


  1. The term virtual service is used because cloud services are considered to be separate from the hardware.
  2. Even though the hardware is detached, it is still used in practice. Separating off the hardware here is a question of ownership.
  3. AWS owns the physical hardware and the user does not physically own the hardware
  4. The user does not own the hardware, only the software, borrowing the hardware from AWS.
  5. This process is termed virtual.
  6. Instances are units of software functionality that can run in the cloud
  7. The term virtual access is used because it functions in the cloud.

Instances are simply packages of software functions used in the cloud, and AWS allows you to combine these packages of functions as required to build the desired system, not just a website.

For someone as old-fashioned as me, the idea that a web server is a single server with web, DB, mail and other functions installed and running is still in my head. This idea has prevented me from understanding the basic structure of AWS, but now that I have used AWS, I feel the convenience and technological evolution that I have come to appreciate.

As an aside, there is a counterpart to virtual servers in the term on-premise, occupied servers. The term would be physical server or real server, but that would be dull, so I wondered if the term on-premise was used because it would be dull.

7-2.Cloud service

Hosting services provided by major companies, not just AWS, are highly cloud-oriented, and unlike the situation in the past where all functions were carried on a single server, all functions are separated and dedicated on different servers.

This makes it possible to build systems with a high degree of freedom, different from the situation in which all functions are provided on a single server, for example by increasing the number of servers for functions that require a heavy workload, while keeping functions that do not require a heavy workload to a small organisation. This makes it possible to build flexible systems in terms of cost and scaling at high loads.

The term instance is used to describe this subdivision and specialisation of functions and packaging.

7-3.Understand how to use AWS

Once you understand the meaning of instances, you will have a better understanding of the basic concepts required to use AWS, and you will be able to think about the meaning of how to use the administration screens and the configuration required to use AWS. This is the first step in my understanding of AWS.

The content of this article is for my own understanding, I am not an expert and there may be some differences from the original meaning, so please refer to the official AWS guide for more information.

8.Misunderstandings and misconceptions about AWS.
8-1.EC2 and RDS

My misconception about AWS was that in order to run Drupal, you need to at least have a configuration that has the Drupal system and Apache on ‘EC2’ and the DB functionality on ‘RDS’. This is the minimum configuration we had in mind.

The bottleneck of this minimum configuration is that RDS is a dedicated DB system with advanced DB functions, so it is over-specified and expensive for small-scale personal use. The RDS pricing is based on hardware specifications, so if you consider specifications similar to hardware configurations such as VPS, it will cost you at least $100, which is relatively expensive for personal use.

8-2.EC2 and EBS

The one-year free packs provided by Lightsail and Amazon have the DB on EC2 and EBS storage, reducing the cost of using RDS. My mistake was that if you don't use RDS, you can't have DB functionality, so CMSs such as Drupal won't work, but Amazon also takes personal use into account, and has plans for different uses and scales.

Lightsail's Bitnami package, which is configured with this idea in mind, has specifications that are sufficient for personal use and small-scale website publishing, even if there is a fair amount of access.

The Lightsail package we selected this time has all the functions required for a CMS such as Drupal, so we will use it for a while and use it with 10.x until we have verified the effects of OS and PHP updates, and we think that an update to 11.x can be done after we have verified the OS and PHP. We think it will be OK.

9.Installed instance and service.
  1. Lightsail Drupal Bitnami -> Drupal
  2. Route53 -> Domain acquisition
  3. Amazon Work Mail -> Email address acquisition/management
  4. Amazon Simple Email service -> Email delivery service

Drupal settings, DB and Apache settings can be configured by logging into Bitnami.

Doute53 is used for domain acquisition and DNS is managed by Lightsail.

Amazon Work Mail is an email client service like Gmail or Microsoft365 Outlook

Amazon Simple Email service is used as SMTP to set up and manage outgoing emails from Drupal.


Below is a summary of links to the official guides for the instances and services installed.

AWS Official Guide

AWS Accounts -> Official User Guide / English

From account creation, you manage security policies and the users running in IAM. Credit card details are registered here and billing is also managed here.


Amazon Lightsail -> Official User Guide

Lightsail administration, Drupal installation and administration is done here.


Lightsail Drupal -> Official User Guide

This is a guide from installation to configuration, including how to use Bitnami.


Bitnami Package for Drupal for AWS Cloud -> Bitnami Drupal Official User Guide

I set up a console login, SSH login, SSL settings, and install themes and modules using Composer and drush. There are no root privileges, so sudo is used to install.


Route53 -> Official User Guide / English

We are acquiring the domain; the AWS service manages this as DNS, but since we are using Lightsail this time, we are managing DNS on the Lightsail instance.


Amazon Work Mail -> Official User Guide / English

Setting up email accounts for acquired domains and using them as email clients.


Amazon Simple Email Service  -> Official User Guide / English

Used to set up the sending and receiving of retrieved emails.

10.What I did this time.
  1. AWS account acquisition -> Billing and user management
  2. Running user set up in I AM -> Installation and configuration of each instance
  3. Drupal installation and configuration -> Configured with Bitnami
  4. Domain acquisition and assignment -> Domain acquisition with Route53 and management in the DNS of the Lightsail instance
  5. Amazon Wok Mail -> Create email account and use as email client
  6. Amazon Simple Email service -> Set up sending and receiving of acquired emails
  7. Building a site with Drupal

The above process completes the basic setup for publishing a website using Drupal in Lightsail.

This is the first time I have registered with AWS and used Lightsail, but it is simpler than I expected and once you get used to it, it is an easy-to-use service. If you read the guide carefully, understand the configuration information and do the settings, even a beginner like me can publish a website.

What is AWS after all? I also thought, ‘What is AWS after all?’, but it is a cloud service that enhances large-scale, subdivided functions by dividing them into different categories. This time, Lightsail is packaged, which gives it a price advantage over combining multiple, specialised, high-specification instances.

This article is a quick summary of each process, like a bullet list.

From the next article onwards, we would like to summarise each process in chronological order in a way that is as easy to understand as possible.

Conclude.

This article describes the process of selecting AWS Lightsail as a hosting service, installing Drupal, acquiring a new domain name and publishing the website. We think it is better to have supplementary explanations in each section, so we will follow the process step by step from the next section onwards and summarise it as an article.

Next article
AWS registration and IAM.

In the next section, we will register and use a separate account with AWS and IAM. IAM is a function that I didn't understand in the first place, so I hope to summarise the inevitability of the function.

Post
2024-11-02
Contributor
S.Takeda
Article
Related articles.

This is a related article on Drupal and web development. Please take a look if you like.

#C06 Installing Lightsail and Drupal.

The installation is easy to complete, as the virtual server called Lightsail and the optimised Drupal are installed at the same time.

#C26 Civic Theme

This is an article about Civic Theme, which sparked my interest in Drupal and led me to build and publish a website.

#C16 Basics of creating page.

I've been writing a series of articles on the basic concepts of Drupal that are necessary for creating pages, but since it's become a lot of articles and it's hard to understand, I'm going to organise them.

Side Bar 01

I migrated my lifestyle blog, which I created using Word Press, to Drupal, and I am currently updating it by adding articles in Drupal.

This is a blog written by a beginner who is learning Drupal.

This article will explain how to build a website using Drupal.

  All Article.

  Drupal Article.

  Web site Article.

  Mac Article.

  AWS Article.

This article is about second-hand clothes and fashion.

  All Article.

  Old-Clothes Article.

  Fashion Article.

  Watch Article.

  Photo Article.

  Recommended Shops.

Core Drupal 10.4.0

Theme Bootstrap5 4.0.3

  Drupal

  bootstrap5

  Bootstrap

  Font Awesome

  Amazon Web Service

  Amazon Lightsail

  Bitnami

  Google reCAPTCHA