Hosting Simple Web Applications Using Amazon Lightsail
Hosting Simple Web Applications Using Amazon Lightsail
Deploying and running an app in the cloud can be rather simple, but where do you
start?
And how do you choose the right service for your customer's needs?
With the abundance of options that AWS offers, this might be a challenging
task,
even for an experienced IT professional.
1. understand how much control you'd like to have over your app
management, and
2. how you can scale the app when your demand starts increasing.
With that in mind, let me show you some things you would need to consider when
architecting on AWS.
We'll take a look at sample architecture diagrams for running an app on Amazon
EC2, AWS Lambda, and Amazon LightSail.
We'll start with Amazon Elastic Compute Cloud, also known as Amazon EC2.
This is a compute platform, where you configure a virtual machine, also called a
VM, with your choice of processor, storage, networking, and operating system for
your workload.
To create a VM, you must launch an EC2 instance. This EC2 instance is hosted in
the AWS Region.
Then, you set up a virtual private cloud, a VPC. There is an isolated virtual network
within a Region.
Inside the VPC, you can customize your network. A VPC also spans Availability
Zones, sometimes known as AZs, that your Region supports.
It's recommended to keep your workload in multiple AZs to help protect your
resources in case of an outage.
Also, if you are unsure where to host media files or how to connect a database,
The architecture diagram for Lambda looks much simpler than the one for Amazon
EC2.
Lambda
Lambda makes compute easier because it provisions everything for you, from
network to runtime.
You simply upload your code and set up events. When the event invokes your code,
Lambda runs functions inside your code to complete a specific task.
Lambda is also configurable. You can run Lambda functions inside a subnet of your
choice, which is ideal if you host a database in a private subnet. That way, you can
connect and manage database to Lambda, and store images in the Amazon Simple
Storage Service.
To access images, you would use VPC peering or a NAT gateway that would go
through a public subnet to the internet gateway.
We will not be covering VPC peering or NAT gateways as part of this course
because LightSail handles all of this for you.
Amazon LightSail is one of the fastest services to launch, manage, and test small-to-
middle-size apps and websites.
After you deploy an app to a server, LightSail hosts all resources in a public subnet.
You can't make a LightSail instance private , but it's possible to restrict access to your
instance using LightSail firewalls.
LightSail also provides its own managed database and several storage options.
On the other hand, AWS Lambda is a simpler service to run code, but it's great only
for short-running, on-demand workloads.
Finally, Amazon LightSail offers an all-in-one experience to launch your app and
scale it as your demand starts growing.
All of these services are great, depending on your unique needs, whether you prefer
to use a fully managed solution, or you are looking for a granular approach to
managing your resources.
There is no right or wrong service. There is only a service that works best for you.
Have you decided which service you'd like to use? Did you say Amazon LightSail?
Yes. That's a great choice for running, testing, and managing a simple app or a
website. Let's see what else Amazon LightSail has to offer.