Category Archives: AWS

AWS LAMBDA SERVICES

AWS Lambda Services

AWS Lambda (Amazon Web Services Lambda) is a compute service that runs developers’ code in response to events and automatically manages the compute resources for them, making it easy to build applications that respond quickly to new information. It runs the code within milliseconds of trigger. AWS Lambda service is a service where you can upload your code to AWS Lambda and the service can run the code on your behalf using AWS infrastructure. This upload and create is called as AWS Lambda function. It also takes care of provisioning and managing the servers that you use to run the code.

The user needs to supply one of the languages which are supported by AWS Lambda. Currently, AWS Lambda supports Node.js, Python, and Java.

AWS Lambda executes the developers code only when needed and scales automatically. A user can use Lambda for building data processing triggers for AWS services like Amazon S3 and Amazon DynamoDB, or a user can create his own backend which operates at AWS scale, performance, and security.

WHEN SHOULD A USER USE AWS LAMBDA?

AWS Lambda is an optimal compute platform for many applications scenarios, where a user can write the application code in languages supported by AWS Lambda and can run within the AWS Lambda standard runtime environment and resources provided by Lambda.

When using AWS Lambda, a user is only responsible for the code. It manages and balances the memory, CPU, network, and other resources. These constraints enable AWS Lambda to perform operational and administrative activities on users behalf, including provisioning capacity, applying security patches, deploying the code, monitoring and logging to Lambda functions.

HOW AWS LAMBDA WORKS

While building applications in AWS Lambda, the core components are Lambda functions and event sources. An event source is an AWS service or custom application that publishes an event, and a Lambda function is the custom code that processes the events. Below are the following scenarios to be considered.

File Processing: For an instance, you have a photo sharing application. People use your application to upload photos, and the application stores the user photos in Amazon S3 bucket.Then your application creates a thumbnail version of each user photos and displays them on the user’s profile page. In this scenario, you may choose to create a Lambda function that creates a thumbnail automatically. Your Lambda function code can read the photo object from the S3 bucket, create a thumbnail version and can save it in another S3 bucket.

Data and Analytics: If suppose you are building an analytics application and storing raw data in a DynamoDB table, when you write, update, or delete the items in a table, DynamoDB streams can publish item update events to a stream associated with the table. In that case, the event data provides the item key, event name, and other details as needed. A user can write a Lambda function to generate custom metrics by accumulating raw data.

Websites: If you are creating a website and you want to host the backend logic on Lambda. You can invoke your Lambda function over HTTP using Amazon API gateway as the HTTP endpoint. Then your web client can invoke the API gateway to route the request to Lambda.

Mobile Applications: If you have a custom mobile application that produces events. You can create Lambda function to process events published by your custom application.

COMPUTE REQUIREMENTS – LAMBDA FUNCTION CONFIGURATION

A Lambda function consists of code and associated dependencies. A Lambda function also has configuration information associated with it. At the beginning, you specify the configuration information when you create a Lambda function. Lambda provides an API for the user to provide some of the configuration data. Lambda function configuration includes the following elements:

Compute resource that a user needs: A user can specify the amount of memory that he wants to allocate for the Lambda function. AWS Lambda allocates CPU power proportional to the memory by using the same ratio as an Amazon EC2 instance type.

Maximum execution time: The user pays for the AWS resources that are used to run the users Lambda functions. To prevent the Lambda function running indefinitely, a user specifies a timeout. When it reaches the specified timeout the AWS Lambda function terminates the Lambda function.

Execution role: This is the role that AWS Lambda assumes while executing the Lambda function on behalf of a user.

Handler name: The handler refers to the method in the user’s code where AWS Lambda begins execution.

AWS Lambda Services

 

WHAT ARE THE MAIN ADVANTAGES OF USING THE AWS LAMBDA SERVICE?

What are the main advantages of using the AWS Lambda Service?

No Servers to Manage: AWS Lambda automatically runs your code without requiring you to provision or manage servers. Just write the code and upload it to Lambda.

Continuous Scaling: AWS Lambda automatically scales your application by running code in response to each trigger. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload.

Subsecond Metering: With AWS Lambda, you are charged for every 100ms your code executes and the number of times your code is triggered. You don’t pay anything when your code isn’t running.

AWS CODEDEPLOY

AWS CodeDeploy
(Automated Software Deployment)

AWS CodeDeploy

AWS CodeDeploy is a part of AWS deployment services which includes AWS Elastic Beanstalk, AWS CodePipeline, AWS CloudFormation, and AWS OpsWorks. AWS CodeDeploy combines application deployments to Amazon EC2 instances, on-premises instances or both.

An application may contain deployable content like code, web, configuration files, executables, packages, scripts and much more.

LET’S SEE THE BENEFITS OF AWS CODEDEPLOY

Automated Deployments: AWS CodeDeploy robotizes your application deployments throughout your development, test, and production environments. AWS CodeDeploy scales with your infrastructure so that you can deploy one instance or thousands at a time.

Reduces the downtime: AWS CodeDeploy helps you in maximizing your application availability by performing rolling updates across your Amazon EC2 instances and track the application according to the rules you have configured. A developer can stop and roll back the deployments if there are any errors.

Centralized Control: A developer can launch and track the status of your deployments through the AWS CodeDeploy console. You will receive a report that lists, when each application revision has to be deployed and to which Amazon EC2 instances.

Easy to adopt: AWS CodeDeploy works with any platform and with any application. You can easily reuse your set-up code. AWS CodeDeploy can also be integrated with your software release process or Continuous delivery tool chain.

THE OVERVIEW OF DEPLOYMENT

  • Firstly, a developer has to create a deployable content such as web pages, executable files, and setup scripts on a local development machine or similar environment. Then add an application specification file (AppSpec file).

Benefits of AWS Codedeploy

AppSpec file is a unique file to Aws CodeDeploy. It defines the deployment actions which you wanted to execute. Then a developer assorts the deployable content and the AppSpec file into an archive file, and uploads it to an Amazon S3 bucket or a GitHub repository. This archive file is called an application revision.

  • A developer provides AWS CodeDeploy with the information about the deployment, such as, which Amazon S3 bucket or GitHub repository to pull for the revision and which set of Amazon EC2 instances to be used to deploy its content. AWS CodeDeploy calls a set of Amazon EC2 instances which is called as deployment group.
  • The AWS CodeDeploy agents on each instance polls to determine what and when has to be pulled for the revision from the specified Amazon S3 bucket or Github repository.
  • Lastly, the AWS CodeDeploy agent on each instance pulls the target revision from the specified Amazon S3 bucket, using the instructions which are given in the AppSpec file and deploys the contents of the instance.

AWS CodeDeploy keeps a record of your deployments so that, you can get the information such as deployment status, deployment configuration and much more whenever you want.

WHAT PROCESSES WILL ALLOW AWS FOR STORING AND ANALYZING BIG DATA?

What Processes will allow AWS for storing and Analyzing Big Data?

The following services are described in order from collecting, processing, storing and analyzing big data:

– Amazon Kinesis Streams
– AWS Lambda
– Amazon Elastic MapReduce
– Amazon Machine Learning
– Amazon Dynamo DB
– Amazon Redshift
– Amazon Elastic Search Service
– Amazon Quick Sight

In addition, Amazon EC2 instances are also available for self-managed big data applications.