AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS). AWS Lambda is a compute that lets you run code without provisioning or managing servers. With AWS lambda, you can run code for virtually any type of application or backend service -all with Zero Administration.
AWS Lambda manages all the administration it manages
• Provisioning and capacity of the compute fleet that offer a balance of memory CPU, Network and other resources.
• Server and OS Maintenance.
• High Availability and automatic scaling.
• Monitoring fleet health.
• Applying security patches.
• Deploying you code.
• Monitoring and logging your lambda functions.
• AWS Lambda Runs your code on a high availability compute Infrastructure.
➢ AWS lambda runs your code on a high availability compute Infrastructure.
➢ AWS Lambda executes your code only when needed and scales automatically from a few requests per day to thousands per second
➢ You pay only for the compute time you consume No charge when your code is not running.
➢ All you need to do is supply your code in the form of one or more Lambda functions to AWS Lambda supports (currently Node Js, Java, PowerShell, C#, Ruby , Python & Go and the service can run the code on your behalf typically the lifecycle for an AWS Lambda
based application includes authoring code, deploying Code to AWS Lambda and then monitoring and troubleshooting
➢ This is in exchange for flexibility which means you cannot log into compute instance or customize operating systems and language runtime.
➢ If you do want to manage your own compute, you can use EC2 or Elastic Beanstalk.
How Lambda Works?
✓ First you upload your code to lambda in one or more Lambda functions.
✓ AWS Lambda will then execute code in your behalf.
✓ After the code is involved, Lambda automatically take care of provisioning and managing the required servers.
Here, are some major differences between AWS Lambda and EC2.
|AWS Lambda||AWS EC2|
|AWS Lambda is a platform as a Service||AWS EC2 is an Infrastructure as a service|
|It supports only limited language like Node Js, Python, Java, C#, Ruby, Go and PowerShell||No Environment Restriction, you can run any code or language.|
|Write you code and push the code into AWS Lambda||For the first time in EC2, you have to choose the OS and install all the software required and then push your code in EC2.|
|You Cannot log into Compute instances, Choose customized OS or language Platform||You can select a variety of OS, instance types, network & security patches, RAM & CPU, etc.|
|If your code took 250ms to execute 300ms||Pay per second, Hourly|
Benefits of using AWS Lambda
AWS Lambda has a few unique advantages over maintaining your own servers in the cloud.
The main ones are:
Fully managed infrastructure. Now that your functions run on the managed AWS infrastructure, you don’t need to think about the underlying servers—AWS takes care of this for you. This can result in significant savings on operational tasks such as upgrading the operating system or managing the network layer.
Tight integration with other AWS products. AWS Lambda integrates with services like DynamoDB, S3 and API Gateway, allowing you to build functionally complete applications within your Lambda functions.
Pay per use. In AWS Lambda, you pay only for the compute your functions use, plus any network traffic generated. For workloads that scale significantly according to time of day, this type of billing is generally more cost-effective.
Automatic scaling. AWS Lambda creates the instances of your function as they are requested. There is no pre-scaled pool, no scale levels to worry about, no settings to tune—and at the same time your functions are available whenever the load increases or decreases. You only pay for each function’s run time.
Important Terms Used in Lambda
Functions A functions is a resource that you can invoke to run you code in AWS Lambda . A functions has code that processes requests and responses between Lambda and the function code.
Runtime Lambda runtimes allows functions in different languages to run in the same base executions environment. The runtime sits in between the lambda service and your function code, relaying invocation events, context information and responses between the two.
Event is Json Formatted document that contains data for a functions to process.
Event Source/Trigger an AWS service such as Amazon SNS, or custom Service, that trigger your function and executes its logic.
Downstream Resources an AWS services, such as Dynamo DB tables or S3 Buckets that yours lambda functions calls once it is triggered.
Concurrency No of Request that your function is serving in any given time.
I hope this will help you set up AWS Lambda Service for your needs. If you have any queries, please feel free to contact us here https://www.mismosystems.com/contact-us/