The Amazon Cloud Services You Must Know and How to use Them
It has been over a decade since cloud computing service became the new buzz word floating around in the media and on university campuses. Since then, computer and technology giants have been busy developing a range of cloud based tools and technologies that can support businesses, developers, IT managers, start-ups and large firms. The selection of tools is diverse – from basic storage services, to advanced security tools, to Machine Learning and IOT.
In this article, we focus on the relevant cloud services needed to upload web applications and enable an application to support an increasing number of users (scalability), while maintaining a high degree of performance and reasonable costs right from the start.
First, we will explain the desired architecture; then we will describe the tools we will be using.
For convenience sake, we will use a common example in today’s applications – an app that enables a user to register and upload pictures.
To create an effective and scalable architecture, we need to enable the automatic scaling of system resources according to its requirements – with no human involvement, and without harming the scalability process schedule.
The system resources we are primarily interested in are:
1. Computing power;
2. Storage;
3. Information database.
-
Computing Power
Amazon has a service called EC2. This service contains a collection of tools you can use to upload different sized servers quickly and efficiently. With EC2 you can find, create or purchase a server image (AMI) that contains the work environment needed, and you can deploy it to a virtual machine of your desired size in your desired location.
In order to make our computing power scalable, we need to design an architecture where we can add instances automatically. For this purpose, we will use another component from EC2 called Load Balancer. The LB is a router that tracks loads to the different instances connected to it, by performing defined and repeated health checks. The LB gives us the option of defining what function to use when the instance does not pass the load balancing test, usually by building new machines which we have defined through the launch configuration. The LB also gives us the option of uploading an SSL certificate and defining designated security groups servers, which can help when we are building new servers. It also eliminates the need to create WildCard SSL Keys and to assimilate them in every server (moreover – Amazon lets you create and upload an SSL key directly to an LB for free).
It’s important to consider information database when we create a launch configuration. Even though any instance lets us save local information (whether in static files or the local instance of the database), this can harm the system’s information integrity.
Looking at our example – a user signs in when the system load is low and uploads pictures; that qualifies as one instance where the data is saved. When a new instance is created, due to a high load of users, each user is routed to one of the two instances. If the information has been saved locally, there is no guarantee that the user will be routed to the same device each time, and the information and pictures he or she initially uploaded will not necessarily be found, and an error will occur. To avoid this, it is recommended using an exterior system database, and to save static pictures and files in an exterior location.
-
Storage
One of AWS’s older and more known services is the S3, better known as the Bucket. The S3 gives you an unlimited and easy option of storing static files, and the ability to access them anywhere (directly and also through an amazingly convenient API). In addition to it being a device that’s easy to use and isn’t limited by location, Amazon allows you to connect it a lot more easily to a content delivery network (a CDN), and this allows you to improve system users’ access speed to the files within it.
If we continue upon our example, after creating an auto scaling group to support the computing power, we will create an S3 Bucket, and direct all the relevant storing files (media and pictures, even static code files such as Css, Html and JS) to it. We will also create a CDN through Amazon’s CloudFront service, and connect it to the S3 bucket. This way, all pictures will be saved externally and an instance will be able to access it at any given moment.
** Make sure to update the link to the correct files in the relevant places with reference to the CDN, otherwise the it will be directed to the original server, and your work will have been wasted**
-
Information Database
The service best suited for information databases depends a lot on the type of database you choose. Amazon support SQL, SQL-Server and others with their RDS service which can deploy an external database to the instances that the code runs on. If the database is not one of those supported (which is becoming more and more common today), there are a few options we can use:
-
Creating a designated server for the database the system is using.
-
Using external services, such as Atlas by Mongodb, for managing the server architecture.
** Note that because managing server architecture is not a trivial process (considering the information survivability, security, database size, information backup and more). The second option is preferable. **
At the end of the process, the final server architecture will look like this:
In addition, there are many management tools that can monitor the architecture’s effectiveness, such as CloudWatch.
In summary,
In recent years, Amazon has invested extensively in creating different types of cloud services. We have reviewed the basic tools required to successfully deploy a scalable application, but this is just the tip of the iceberg – services exist for almost anything imaginable: containers for running code, artificial intelligence, built-in user management and more.
If you require more information, here is the complete list of Amazon’s cloud services.