Amazon provides a lot of services so it is difficult to cover everything in one article but I will try my best to cover in this article.Basically,AWS is a subsidiary of Amazon.com which provides cloud computing resources and operates in 12 geographic regions and makes the on demand computing platform that is offered by AWS.
What is Cloud?
Cloud computing is a kind of virtual computer. Cloud computing in layman language is whatever application and resources you are going to use, you only have to pay for that resource.
Cloud computing is not restricted to certain domain nowadays, you can useful cloud computing for anything. After the introduction to IoT, cloud computing penetrates to everywhere because it just not related to IT related thing but can be anything.
Cloud computing is basically everything about AGDT as it is flexible, on demand and you can restrict the code, you can use when it needed. All things you can easily achieve through Cloud computing.
Let’s take the example of Google and Facebook have heavy traffic, before cloud computing it was very difficult to handle the traffic but now with cloud computing, it is very easy to manage traffic easily.
Agenda of this article:
Overview of AWS
Amazon Web Services (AWS) is designed to use AWS cloud services.AWS packages is free for 12 months from the registration.Amazon Web Services provides cloud computing solutions for online marketing business provides a flexible, scalable and highly resilient, low-cost content delivery mode. AWS is a virtual machine-based platform for a web application framework where you can run on a variety of operating systems and services.
Region : A region is a separate geographical area and inside a region there are multiple availability zones and they are isolated with each other and connected via low latency links.
Availability Zone: There are multiple availability zones inside a region. Incase of failure of a particular availability zone, the service can operate from the another availability zone.It’s basically an Isolated location within a region where the data center is hosted.
On Premises vs AWS Cloud:
The question is why do you shift to aws cloud? Now when we compare on premises vs AWS cloud, In terms of cost ownership, we can see various parameter here where Cloud can optimize the customization and implementation. We don’t have to worry about the maintenance and training part. So, these are the various parameters where the AWS Cloud handles. We can see that we don’t have to worry about 77% maintenance than the on premise services we are operating now.
It offers a range of services like Compute services, Storage services, Network services and Database services.
EC2(Elastic Compute Cloud):
It provides the facility to host the Virtual Server which is called Instance in term of AWS language.It provides support for to deploy your services on Windows, Linux, FreeBSD, and OpenSolaris.Also provides replication of data availability zones. EC2 Keep track and monitor data usage.
ASG (Auto Scaling Group)
Scale your EC2 instances automatically. No additional charges required.It is used by applications which ELB experience variability usage.It measures the CPU utilization at every instance and one reached the threshold, it will automatically create the new virtual server.
ELB (Elastic Load Balancing)
ELB supports load balancing in various EC2 instances. It seamlessly integrates with auto scaling group(ASG) so whenever new instance launch by ASG, it will automatically route the traffic to the new EC2 instance.
Next, We are going to talk about Storage services of AWS.
S3 (Simple Storage Service)
- It’s an Object based storage.It provides 99.9% durability of objects.It gives free storage up to 5TB size per project.
- Well known and various enterprise like Dropbox are using S3 for storing the data.
- It supports Multipart upload improves throughout.
- Lifecycle management for achieving old objects. If you want to delete or archive object, you can manage it here through various lifecycle management tool.
- Service static content as a website.
- It provides Persistent block storage.
- You can bound it too easy to instances like to give an analogy, hard drive in laptop similarly you can use the hard drive for EC2 instance.
- AWS provides various database Services, let’s understand those services now.
RDS (Relational Database Service)
- Database engine: MySQL and Oracle 11g,postgreSQL, MariaDB.
- Backup the data so you don’t have to spend more time in maintenance of data.
- Fault tolerance
- NoSQL database. You don’t have to write SQL queries.
- Fast predictable performance
- Easy to manage
VPC (Virtual Private Cloud)
- Logically isolated networking services: where you can logically isolate the networking services and launch your own cloud in VPC.Customize your network configurations that are where you can create IP address and subnet to customize the network configurations.
- Multiple Connectivity options: If you want to public or private VPC , you can create through multiple connectivity options.
- Secure: It is more secure and also you can manage cost.
These are the basics services of AWS, they are many more services offered by AWS like mobile services,analytical services, notification services and development tools etc.
CICD(Continuous Integration and Continuous Deployment)
This is service is not very new to the world. This is also known as DevOps(Development Operations) tool.
Whenever you write a code and pass to the QA and move to staging server but there is something not work on the server and in that there is some downtime to solve the issue on the server. But if you have seen in larger companies like Google and Facebook, they don’t have downtime when deploying any new features to the server. For that CICD is useful and it solves the issue of downtime.
Let’s understand the process of CICD:
First, you are deploying to the development server.Next to the test server and then to the staging or preproduction server. After all works fine, deploy the code to the Production server.
The first stage is called the Development so you need to manage the code base because a couple of developers are working on the development server so you can use the versioning system(Exa, GitHub, SVN) for that. Every developer can download the code and commit the changes when required.
The development server is in a local environment and other servers are on the live server so sometimes the path of images or templates are different and you need to change after the deployment which may go the server in maintenance mode but CICD reduces that time too.
The staging server is identical or mirror copy of Production server so the purpose of staging is if any bug found on a production server, So, first debug the issue on staging server, try to fix the issue over there and deploy the same code on production. You can also test the user capacity and usage testing on staging server.Doing something directly to the production is not good so better to use the staging server.
Once you code tested on staging, You can move code the Production.
Overall Process of CICD
Release process has four major phases:
First, come to the source, Source is the source files, this may be .JAVA,PHP etc files and also peer review the code and next is the build to prepare the code to deploy, you can do unit testing when you build actually.You can also build containers and image with the help of tools.
After that Test stage and perform the all type of testing like functional testing, integration testing, load testing, penetration testing everything and make your code ready to deploy. Once it will pass everything it passes to the Production.CICD helps to write a proper workflow to handle everything automatically.
So we can say this is the overall process of CICD. Next topic is the CICD levels.
Let’s understand the release process levels in CICD.
Let’s understand the final three very important terms:
- CI (Continuous Integration) – Building code base according to deployment
- CD (Continuous delivery) – Delivery up to the test
- CD (Continuous Deployment) – Deployment of the code in production
So These are the ultimately three terms for designing your application, designing of the database also important in CICD. CICD will have less or no downtime as everything will be automatic.
It’s is not easy at all to build this kind of system. You might need to use some tools you build this type of system. Let’s understand some tools useful to build CICD application.
Overall Development Stages
Development: Development environment can be anything. You can use any Operating system. Based on development environment you have different builds.
Version System: You can use any version system like GIT,SVN,Code commit etc. Code commit is nothing but GIT of aws. Code commit price is cheap.
Build: you can use the tool called Jenkins for the build. Jenkins is a tool used to create magic. You can use Jenkins for any technology like JAVA, PHP, PYTHON but build process will be different on technology.you can PHING for PHP project build system and Maven to build java application.
Deploy: Finally deploy your code. Once Jenkins provides builds, you can deploy your code and Code deploy tool help to deploy your code easily to the server. Code deploy is amazon integration service and it’s free service.Code deploy has very simple utility tutorials and the best part of Code deploy is revert back. If something goes wrong, you can easily revert the code.
Only code deploy, Jenkins or version system does not work to build CICD process. It will work together and create CICD environment.
CICD Basic Demo:
Component we are going to use:
- Repository GITHUB
- Jenkins build tools
- Code deploy
These are the things we are going to use,Repository is GitHub, Jenkins is build tool,Jenkins will copy to the S3, S3 is used for zip or xml the file which helpful for profile and code deploy will deploy the code.
Here, Create a two profile, one profile for staging and a second profile for production. Once I select staging profile, it will convert the codebase at a time of build according to the staging server. After testing, I can select production and deploy the code.
Integrated Jenkins for automatic deployment for GIT so whenever to push the code, it will automatically deploy the code. It will automatically detect the changes when to commit the code and understand the new code and create the build and once the build is successful, Jenkins automatically deploy to the production server.
AWS lambda is a code as service.It is basically microservices. AWS Lambda is one the best service compare to any other service of the amazon.It is number one researched in the World and as a developer, it is very useful service for us.
What is Lambda?
AWS lambda is a zero administration compute platform for backend developers that runs code in the AWS cloud.AWS Lambda is a compute service.You can set up AWS Lambda functions to respond to events asynchronously.
Let’s take some basic use cases where Lambda comes into the picture.Suppose you are running a scheduler for every application and Scheduler is taking backup of the file in regular intervals. If any user uploads an image, an image will be compressed, the thumbnail will be created so you can manage through the scheduler. Now if you have a limited set of users like 12 or 15 users at that time, you can easily manage.But if you have more concurrent users like 500-1000 users, it would be easily handled through the AWS Lambda, you can write image compression, thumbnail generation code in Lambda and keep it there and create an event which will perform the operation when to trigger through Lambda configuration.
So, Server resources will be used to perform other operation on images for all concurrent users,You can manage all thing through Lambda, if you have 500 users, 500 lambdas will be used. It will dynamically use the compute resources, RAM and required amount of space, CPU and once everything was done, release the resources which can save your resources, server cost,maintenance cost etc.
AWS Lambda can use as follows:
As an event-driven compute service where AWS Lambda runs code in response to events like change data in an Amazon S3 bucket or an Amazon dynamoDB table.
As a compute service to run your code in response to HTTP requests using Amazon API Gateway or API calls made using AWS SDKs.
Programming languages AWS Lambda support:
AWS Lambda is CAAS (Code as a Service) where no need to host your code, no need to give specific hardware, Lambda will decide hardware at the runtime and compute the code. It will never down and if your server is down,it will be handled through microservices.
AWS Lambda supports following languages.
You can set email,SMS and push notification etc you want to set up through lambda.
Where is AWS Lambda running code?
AWS Lambda runs your backend code on its own AWS compute fleet of amazon Elastic compute cloud(EC2) instances across multiple availability zones in regions, providing the high availability,security, performance and scalability of AWS infrastructure.
What are the Benefits of AWS Lambda?
AWS Lambda has many benefits but we will discuss few of them:
AWS Lambda provides the serverless deployment technology. You can use the AWS Lambda to create a serverless schedule.AWS Lambda function is a stateless service which handles requests by invoking AWS services.
AWS Lambda provides the Event-Driven Data Management for Microservices.Event-driven workflows for event-driven automation products.Event-driven automation also allows for easier management of computing resources at a scale.
No need to configure the server and automatically handles load balancing, auto scaling, resource utilization memory management due to the Event Driven service.
Sub Second Billing:
AWS Lambda only charged you for what you use.Charges of AWS Lambda based on the number of requests for your functions and the time your code executes.AWS Lambda provides free tier for 1M free requests per month and 400,000 GB-seconds of compute time per month.
How AWS Lambda Works?
- Authoring: Authoring Lambda Functions Using Eclipse IDE and AWS SDK Plugin.
- Stateless: AWS Lambda works on stateless development.
- Development: AWS Lambda allows developers to write code that triggers automatically to events.
- Monitoring and Logging : AWS Lambda automatically monitors Lambda functions and reporting metrics through Amazon CloudWatch.it helps to monitor you code executes.AWS Lambda automatically tracks the number of requests, the latency per request, and the number of requests resulting in an error etc.
Which services are integrated with AWS Lambda?
- API Gateway
How long can an AWS Lambda function execute?
It takes Minimum 1 seconds and maximum 300 seconds and it defaults timeout is 3 seconds,but you can set the timeout to any value between 1 and 300 seconds.The memory size you select for your Lambda functions determines how long functions can run in the free tier.
Here,I am ending the article, but this is not the end of AWS Services Topic. I will share more services very soon.Well, that’s it. I hope at least someone will benefit from this article.Do share this article with your friends to let them know about AWS services.