Blog Is AWS Lambda a Server-Side Component? RSS Feed

Is AWS Lambda a Server-Side Component?

Sep 5, 2018

Before I answer this question, let’s understand about AWS compute services and that too Lambda in details.

AWS Compute Domain

Following are the main services in the compute domain –

EC2 – Most important is EC2 service, It’s like your Personal computer in which you are working remotely. You can install any OS which is supported by AWS and you can work on it as per your needs.

Elastic Beanstalk – Which is an automated version of EC2, where you will not have permissions to access OS but you will have control on configurations. Beanstalk used to deploy applications basically we upload the code and our application automatically get deployed on AWS infrastructure.

AWS Lambda – It is a server less compute service (an automated version of EC2 instance) that runs your code in response to events, where you don’t have to access any OS or even have to configure your server. Simply you just need to upload the code and it will be executed on the respective trigger.

AWS Lambda

Why AWS Lambda?

  1. Lambda is a compute service (where actual computation will AWS happen) which enables you to run your business logic without having to provision or manage any servers.
  2. Lambda code will run on top of AWS infrastructure, leaving developers worry-free from infrastructure management.
  3. AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second.
  4. AWS Lambda offers following features
  • High-availability compute infrastructure and manages the affairs of compute resources
  • Operating system maintenance
  • Capacity provisioning and automatic scaling, AWS Lambda will dynamically scale capacity in response to increased traffic. https://docs.aws.amazon.com/lambda/latest/dg/scaling.html
  • Code monitoring and logging.

When Should I Use AWS Lambda?

AWS Lambda is the platform with computational power which can be used in various application use cases. As of today, it is supporting the application development in the following languages:

  • Node.js
  • Java
  • Go
  • C#
  • Python

And runs within the AWS Lambda standard runtime environment.

When using AWS Lambda, you are responsible only for your code irrespective of the languages whether it is Java development or Python development or any other. AWS Lambda manages the compute resources that offers a perfect balance across different parameters like memory, CPU, network, etc. This is of course, in exchange to flexibility, meaning you cannot log in to AWS account and customize compute instances in terms of the operating system or language runtime.

Event Driven Model

AWS Lambda functions will be invoked against various preconfigured events, including events from AWS services such as:

  1. S3 (such as changes to S3 buckets)
  2. DynamoDB (such as updates to a table in the database)
  3. CodeCommit
  4. CloudWatch (such as as a response to an alarm)
  5. and AWS IoT
  6. This platform can also enable function calls based on following hooks
  • inbound messages (Kinesis, SNS)
  • incoming HTTP requests (API Gateway)
  • by a scheduled event

Here we can see one scenario where

  1. We will upload a CSV file to an S3 Bucket, which triggers a Lambda function.
  2. The Lambda function reads the CSV file and sums each line, which consists of comma separated numbers.
  3. SNS topic will publish the results and distribute to two subscribers
  • SQS Queue, and
  • email subscriber

Lambda Function

AWS Lambda Limits

AWS Lambda Resource Limits per Invocation (as taken from aws docs)

Resource Limits
Memory allocation range Minimum = 128 MB / Maximum = 3008 MB (with 64 MB increments). If the maximum memory use is exceeded, function invocation will be terminated.
Ephemeral disk capacity ("/tmp" space) 512 MB
Number of file descriptors 1,024
Number of processes and threads (combined total) 1,024
Maximum execution duration per request 300 seconds (5 minutes)
Invoke request body payload size (RequestResponse/synchronous invocation) NOTE: The response body payload also must adhere to this limit. 6 MB
Invoke request body payload size (Event/asynchronous invocation) 128 KB

AWS Lambda Account Limits Per Region

Resource Default Limit
Concurrent executions (see Managing Concurrency) 1000

Pricing

This is in my opinion, the biggest win. You pay only for the actual processing time you consume – when your code is sitting idle, your billing meter is down!

The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.

AWS Lambda Pricing

Comments

4 thoughts on “Is AWS Lambda a Server-Side Component?”

    1. Thanks for appreciating. When using AWS Lambda, you are responsible only for your code irrespective of the languages whether it is Java development or Python development or any other.

    1. First of all thanks for reading the blog. Now coming to your question, AWS Lambda services can surely be used for developing the serverless architecture, to share the steps for implementation, please refer the below post, it will cater the information.
      For any of the further question, feel free to ask.

Leave a Reply

Your email address will not be published. Required fields are marked *

About Tatvasoft

TatvaSoft is a CMMi Level 3 and Microsoft Gold Certified Software Development Company offering custom software development services on diverse technology platforms, like Microsoft, SharePoint, Biztalk, Java, PHP, Open Source, BI, Big Data and Mobile.

Follow Us