People want to get their websites or applications up and running as quickly as possible. With Amazon Lightsail, we are able to deploy our web server, install & configure Git, clone our GitHub repo, and enable our web services with less than 2 minutes of work. Don’t believe me? Check this out!
Amazon Lightsail is an easy-to-use service that provides Virtual Private Servers (VPS) with CPU, Memory, Storage, and Data Transfer Allowances at a predictable monthly price, with the cheapest being $3.50/month!
Another benefit of Lightsail is that you can choose either a bare Operating System or an application blueprint to help you get up and running faster. Some application blueprints offered include: WordPress, PrestaShop, GhostCMS, Adobe Magento, LAMP stack, MEAN stack, etc.
sudo yum update -y
sudo yum install -y git
sudo yum install -y httpd.x86_64
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
git clone https://github.com/lightsail-demo-environment/dimension-public
sudo mv ./dimension-public/* /var/www/html/
This script updates the packages library, installs Git, installs apache, starts the apache service, adds it to run on startup in case our instance is rebooted, clones my website repo, and then moves the files into my web directory.
If your GitHub repo is private, You’ll need to authenticate to your private repo in the CLI to clone the files. Will create a post about that another day.
If you want to add a static IP, Lightsail makes it easy to generate the IP and attach it to your instance. Once you click on your instance, click the ‘Networking’ tab
Your static IP is now created and assigned to your instance. We can then copy-and-paste the IP address into our browser and see that our website is up and running.
As I said in the title, there is a freebie here too if this is your first time trying Amazon Lightsail. Head on over and sign up to use the service and get your first 3-months free (if you choose one of the associated instance types). Let me know what you think!