AWS Lambda: Definition
The AWS Lambda is a responsive cloud service that inspects actions within the application and responds by implementing user-defined codes, known as functions. The AWS Lambda supports the code written in Java, Python, and Node.js, and the service can initiate processes in languages supported by Amazon Linux (which can initiate processes in languages compatible with Amazon Linux, including Bash, Go and Ruby).
Some tips recommended when using the AWS Lambda
- Never declare any function variable outside the scope of the controller
- Make sure, if you have a set of permissions on your files in the zip code sent to ensure that Lambda can run the code in your name.
- Delete old Lambda functions when they are no longer needed.
When Should I Use AWS Lambda?
AWS Lambda is an ideal computing platform for many application scenarios, since it can write the application code in languages supported by the Lambda AWS and run in the AWS Lambda standard execution time environment and the resources provided by Lambda.Ao Using the AWS Lambda, you are responsible only for your code.
AWS Lambda manages the fleet of computers that offers a balance of memory, CPU, network and other resources. This is in exchange for flexibility, which means you can not log in to compute instances or customize the operating system or language execution time.
- The Amazon Elastic Compute Cloud service (Amazon EC2) offers flexibility and a wide variety of EC2 instance types to choose from. It offers the option to customize operating systems, network and security configurations and the entire software stack, but you are responsible for capacity provisioning, fleet integrity and performance monitoring, and use of availability zones for fault tolerance.
- Elastic Beanstalk offers an easy-to-use service for deploying and scaling applications on Amazon EC2, where you maintain ownership and full control over the underlying EC2 instances.
Features of Lambda
- Pay for execution.
- Create an event-oriented architecture For example, activate your lambda function when an image is loaded into the Amazon S3 to add a watermark to the image or change its format.
- Tolerance of integrated faults.
- Automatic Scale.
- Integrated security model (sector compliance).
Limitations of AWS Lambda
Some limitations are hardware specific and some are linked by architecture. We are going to discuss all of them. Hardware limitations include disk size, which is limited to 512 MB, memory can vary between 128 MB and 1536 MB. Afterward, there are some others, as the execution timeout can be maximized to only 5 minutes, the payload of the request body cannot be greater than 6 MB and the body of the request is 128 KB.
The payload of the body of the request is like the data that you send with a request “GET” or “PUT” in HTTP, where, as the body of the request would be the type of request, the headers, etc. Actually, they are limitations, but they are the design limits that have been defined in the Lambda architecture, so if your use case does not fit in them, you always have the other AWS computing services at your disposal.
Related Blog – What is AWS?