A client was looking for a new host for their Wappler project — wanting to use one of the biggies, but also did not want to get deep into the weeds of hosting. After researching a few, we landed on Lightsail from AWS.
Lightsail is an easy-to-use cloud platform that offers you everything needed to build an application or website, plus a cost-effective, monthly plan.
Lightsail is ideal for simpler workloads, quick deployments, and getting started on AWS. It’s designed to help you start small, and then scale as you grow.AWS Lightsail website
Lightsail has a lot of options to meet a variety of needs — for this project I setup a LAMP stack on Linux. It is very easy to get the base instance up and running, but there are a couple quirks to be dealt with. The first of which is getting a secure certificate installed. I suppose Amazon is trying to get the consumer into a distribution setup with load balancing, CDN, etc. but for those not needing that overhead, there was no option to just install the cert. Luckily, a found out about the Bitnami cert tool, and that cleared that hurdle. Just run their terminal command and through a series of question/answer prompts, a certificate is added including domain aliases and monthly renewal of Let’s Encrypt certificate.
The other annoyance, is that once a database is setup, the db name is not readily present on the Connect screen — it has the endpoint, the port, username and password, however no database name! Perhaps it shows up if you specify a name, but in choosing the default, it does not appear.
The Wappler target is setup as any other custom hosting, just provide all the particulars and you are connected.
I was working from a MAC, so I just had to reset the permissions of the key file, and connect once manually outside of Wappler in order for the connection to be made, but that is my typical workflow.
The database connection is also easy to setup, just provide all the details from your Lightsail panel:
By default Lightsail has OPcache enabled by default. This may be preferable for a production environment, but for development it just won’t cut it. Here is how you disable OPcache:
From lightsail console you can connect using SSH
Then type nano /opt/bitnami/php/etc/php.ini
Find the opcache.enable = 0 line and change the zero to 1
For the complete demo, head over to my video catalog: