Amazon Web Services, all you need to know
Nowadays, cloud computing has become a central part of any tech company – that includes every company now since most of them can be categorized under “Software as a Service” (SaaS). In this post, we will try to simplify the most important Amazon cloud/web services known as AWS.
This post will help you to understand different services by Amazon and their different capabilities. and to discover the new opportunities that come with using cloud computing instead of self-managed infrastructures.
AWS most used services
To clarify, Amazon provides many services that can be very useful for your application, however, some of them can be helpful for someone but not so important for others. Therefore, in this article, we are going to focus on the services that are important to everyone starting with Amazon Elastic Compute Cloud (EC2).
Amazon Elastic Compute Cloud – EC2
EC2 is a virtual computing service that simplifies the setup and configuration process where you can start or terminate instances/servers in minutes with pre-configured operating systems and applications. It also gives you the ability to create your image or snapshot of a running EC2 instance and start a new one with the same status of this image/snapshot without the need to turn it off.
EC2 provides you with a wide range of operating systems and applications selection including different versions of Linux and Windows OS. Some of them are eligible for the free tier that allows you to use them free of charge.
Amazon provides different types of the EC2s. For example, some of them include a lot of memory RAM and some of them have a very powerful computing capacity CPU, etc. The good thing is that you can choose different EC2 types for each part of your application and pay only for what you really need.
If your application does a lot of processing, you will need one of the “Compute Optimized” instances that can give you between 2 to 72 vCPU with memory capacity from 4 to 144 Gigabytes.
However, if your application doesn’t need powerful computing capacity but still needs to keep more data in memory for fast access such as an in-memory database, you can use a “Memory-Optimized” instance that can give you memory capacity from 122 to 3904 Gigabyte and vCPU from 4 to 128 core.
The full list of EC2 types can be found here:
A very powerful feature EC2 brings to you is the auto-scaling. This feature enables you to define certain attributes to scale your computing capacity up or down. For example, you can create an auto-scaling group of “5” EC2 instances and define the minimum size as “2” and maximum size as “5” then configure your scaling plan to launch a new instance when the CPU usage is over 80% or maybe when the memory usage is over 70 percent. So, it will start one instance when the current running EC2s reach 80 percent of CPUs or 70 percent of memory and so on until all five instances are running. Then, when there is no load on your application, your instances will turn off one by one until only two instances are working. This feature not only will save you a lot of money but will make you able to sleep better at night.
Elastic Load Balancers
Elastic Load Balancer handles the workload on your application by distributing the traffic across multiple EC2 instances and IP addresses. Load Balancer can also be your access point to attach SSL certificate to multiple EC2 instances without the need to configure each one by yourself and will provide you with health check notifications when one or more of your instances are down or about to go down. It would take you two to five minutes to set up your load balancer.
Identity Access Management (IAM)
IAM is a way of assigning permissions to users or groups. You can define the access policy of certain services or resources. For example, DB admins cannot access computing instances or storage such as S3 buckets.
If you ever worked on a firewall configuration on Linux before, you know how it can be tricky and difficult in sometimes. With the “Security Groups,” you can define rules from a GUI and that will be applied immediately to your instances without the need to reboot them.
For example, you can block access to port 22 except from your IP address and allow HTTPS on port 443 from everywhere.
Important to know about Security Groups:
- It is free of charge, so you don’t pay for it.
- The immediate effect of the rules.
- When you allow inbound traffic, the outbound is allowed too.
- All inbound traffics is disallowed by default.
- You can assign multiple security groups to an EC2 instance.
- You can assign a security group to many EC2 instances.
- You cannot block an IP address using security groups but you can use network access control lists.
AWS Storage Types
Amazon web services provide different types of storage trying to cover all your application needs from cheap archiving solution to elastic file system storage.
Elastic Block Store (EBS):
EBS is a block level volume that can be attached to an EC2 instance. You can consider it as a virtual hard drive with diverse features. For example, you can choose from various volume types such as SSD or HDD and many sub-types under each of these types.
Important notes to know about EBS:
- You can change volume size on the fly. If you need another 200GB, just increase it without the need to reboot your instances. However, this option is not available with magnetic storage type.
- Each EBS volume is replicated automatically within its availability zone to protect your application from component failure.
- EBS and EC2 must be in the same availability zone.
Elastic File System (EFS):
If you ever needed a big storage space that can be accessed from different servers to ensure the availability of files, EFS is your simple solution for achieving that. EFS is an elastic file storage which is designed to scale up or down on demand without your interfering. Your application will always get the storage space that it needs and you will only pay for your consumed space.
Important notes about EFS:
- EFS support network file system NFS v4.
- EFS can scale up to Petabytes.
- EFS can support thousands of concurrent NFS connections.
- EFS data is stored across multiple availability zones within a region.
- EFS automatically scales up and down.
- Each directory and file stored in EFS is redundantly stored across multiple availability zones to ensure availability.
- EFS provides a secure and fast way to move files from on-premise servers into EFS which can be 5x faster than normal Linux copy tools.
Simple Storage Service (S3):
Amazon Simple Storage Service (S3) is an object storage designed to ensure 99.999999999 percent durability. So, all of your files automatically distributed across at least three availability zones.
Important notes about S3:
- Files are stored as objects inside buckets “directories.”
- S3 is not a file system, you have to use AWS SDK to give you file system functionalities over these files.
- S3 ensures an immediate access to a file after creation. On update, you might get the new one or the old one if the update is still in progress but you will never get corrupted or partially outdated files.
- S3 has three types: S3 Standard, S3 AI, and S3 Reduced Redundancy Storage that differ in cost and speed.
- S3 is a universal namespace. The bucket name must be unique globally.
- S3 gives the ability to run big data analytics without the need to move your data to another analytics system. This feature is called “Query in Place”.
- S3 provides an API to make it easy and secure to move data in or out S3.
AWS provides a wide range of database solutions for your application, including Relational Database, No-SQL database, and In-Memory Data Store with many Database providers under each of the previous categories such as MySql, PostgreSQL, MariaDB, SQL Server, Oracle, DynamoDB, Redis, and Memcached.
AWS Database Migration Service:
This is another feature that AWS provides. It helps you to migrate your database from one database type to another, including all databases, tables, views, stored procedures, etc.
It is good to know the key features of Amazon web services. Now you know about the different types of EC2 and when to use computed-optimized, memory-optimized or any other types for your computing servers. You also know the different types of storage and the advantages and disadvantages of each type – you can decide which one is the best for your application and your budget. In addition, database types that AWS supports and the great migration service that AWS provides to help you move your data from one type to another. Finally, we would encourage you to visit AWS website and read more about the other services that I did not mention in this article.