This section summarises the five Amazon Lightsail-related articles I have written over the past five issues.
The work performed this time is installing a packaged instance of Drupal in Lightsail, an AWS VPS service, and configuring various settings to run it as a website.
The service and instance selected are as follows.
- Amazon Lightsail // $12.0/month -- 2GB memory - 2vCPU - 60GB SSD - choose 3TB transfers - free for 3 months
- Bitnami Package For Drupal For AWS Cloud // Fees are included above.
- AWS Identity and Access Management // IAM--no fees charged.
- Route53 // Domain fee $14.0/year
- Route53 // Region usage fee $0.5/month
- Lightsail // Region usage fee $0.2/month--SnapShot usage fee
- Amazon Work Mail $4.0/month--billing not yet raised.
- Amazon Simple Email Service // Free for 1 year--billing not yet raised.
The charges are included for reference. The main services that are actually billed are Lightsail at $12/month and Work Mail at $4/month, Route53 at $0.5/month and Lightsail snapshot at $0.2/month, making $16.7 + Tax$1.67 per month for the monthly operating costs.
Since I just started AWS service, I am not sure how the billing system works, but the fee is not as much as I expected, and since Lightsail is free until the end of the year, $18.37/month will be the usage fee from January when the regular billing occurs. The monthly cost will be just under ¥2,800 at an exchange rate of $1.0=¥150.
Considering the content of the service and the price, there may be cheaper services in Japan, but considering the stability of the system and the scalability and flexibility of the service, it is not an expensive service.
At first, the management console interface and the number of instances with finely divided functions can be overwhelming, but the freedom and short time cycle for system expansion and contraction are the biggest advantages of using AWS, and an environment where a system that can scale quickly and with low risk is an excellent service that cannot be matched by domestic hosting.
Here is a bulleted list of the work we did this time. The article is long and complex in text, but the actual work is concise and not very difficult.
Register with AWS and set up an executing user.
#C04 Amazon Lightsail.
#C05 AWS registration and IAM.
- Register with AWS
- Create execution user in IAM
- Register the required instances with the execution user.
Once you have registered with AWS and created an executable user, login with the executable user and install Lightsail and Drupal. The installation is very simple: select the region you want to install in, select the package, select the Lightsail plan, and then install, which takes a few minutes and creates a Drupal instance in the Lightsail console.
#C06 Installing Lightsail and Drupal.
- Lightsail and package selection
- Region selection
- Deciding on Lightsail and Bitnami Drupal instances
- Deciding on a Lightsail plan
- Installation
Once the Drupal instance is ready, change the IP address to a static address and assign the domain, using the DNS on board the Drupal instance, checking the AWS nameservers that are set by default and writing the primary domain and subdomain in the DNS in the A record to complete the domain assignment.
Issue a private key to enable SSH access to the Drupal instance, confirm the SSH connection, and once connected, obtain the root password to configure the initial settings for the Drupal admin console and complete the initial Drupal configuration.
Since you will be configuring SSL settings, connect to the Drupal instance via SSH, complete the SSL settings in the msert specified by Bitnami, and the installed Drupal website is ready to be published.
#C06 Installing Lightsail and Drupal.
- Obtain domain name via Route53
- Attach static IP to installed Drupal
- Set up domain information in the DNS of the Drupal instance
- Configure SSH to log in to the Bitnami instance
- Checking the login account of the installed Drupal instance
- Logging into the Drupal Admin console for initial configuration
- Building a website with Drupal
- Configuring SSL
Issue email accounts with the domain you have acquired. Amazon Work Mail is a service similar to Google Workspace's Gmail, where you set up an organisation to manage your domain, and then register users within the organisation to issue email accounts.
To enable the use of email accounts on the acquired domain, after registering the organisation, assign the domain to the organisation and write email-related records such as MX records and CNAMEs in the DNS. Once you have completed the configuration, you can register as a user and issue email accounts. By default, an email client that can be used on the web is issued, but since everything is in English, configure your email client so that you can use email on your Mac or iPhone.
#C07 Amazon Work Mail.
- Start using Amazon Work Mail
- Determine your region
- Set up your organisation
- Assign a domain to your organisation and set up DNS
- Register users and issue email accounts
- Change the domain of the sending address from the AWS domain to your own domain
- Test the use of the email account
- Set up a Mac or iPhone email client as the default web-based email client is only in English
Now that the email address of the domain you have acquired is available, configure the contact form - we will use the Drupal default contact form, so configure the necessary settings. Since we are setting up an email form, we will install a reCAPTCHA for security reasons.
In my mistake, I registered the initial settings with a personal address before acquiring the domain, and after acquiring the domain, I set the email account of the domain I acquired as the recipient of the contact form, which resulted in an error where the contact form email could not be received.
If you change the registered email of the user account you are using to the email of the domain you acquired and set the recipient of the contact form to the email of the same domain, it will work without problems, so if you do this, the contact form setup is complete.
I made an error and took another option, so I installed SMTP Authentication Support, a module that enables Drupal to use external SMTP, configured SMTP authentication with Amazon Simple Email Service and set up the contact SES is used to send and receive forms. It is a form like the merit of the injury which was set up by the detour of the error, and it is an over-spec system in my WEB site, but it is an environment which can use the system of the email with high specs, so I will use this form for a while.
#C08 Contact Form and SES.
- Contact form settings
- Configuring Google reCAPTCHA v3
- Error verification after contact form implementation
- Configuration of Drupal external SMTP module
- Configuration of Amazon SES
- Operation verification
- Fixed when it was realised that the cause of the error was a simple mistake
- Operation verification completed
In the above form, I used AWS, installed Drupal on Lightsail, completed the necessary settings and the website was published. What I didn't expect was that I made an error in the contact form and had to use an external SMTP, but thanks to that mistake, I started using SES, which I personally didn't feel the need to do, and this has made me realise the high availability of the AWS system.
AWS has an image of being a large-scale cloud system used by professionals, and I myself thought it was not for personal use, but by actually using it, I found that personal use was no problem and that it was an excellent system that was very easy to use. There are some problems in understanding the system and how to deal with the English manuals, but even a beginner like myself can understand and actually use the system with a little patience. The price is not easy to understand, which is a concern from an external point of view, but when I actually use the system, I realise that it is certainly different from the price structure of Japanese hosting companies, but it is not difficult to understand.
The fact that the unit of measure is set in hours makes it difficult to predict the approximate monthly cost, but when you understand that the high availability of AWS is related to the flexibility to scale by the hour and the ability to seamlessly expand and contract without system shutdowns, you can understand that the fee structure makes sense and that the system is flexible. system.
I have only just started using AWS, so I am still inexperienced in terms of its original functions and how to use it for its intended purpose, but I have found it to be a wide-open and tolerant system that even a novice like me can use.
Drupal 10.3x and Extensions.
So far, we have proceeded with the installation and configuration of the environment from a local Mac environment to AWS, so from the next section onwards, I would like to put together an article on Drupal. My Drupal environment is very simple and I have only included a minimal number of modules. In the next article I would like to introduce the modules I have installed.