AWS Lamda

AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. It was introduced in November 2014.

No worries about the server - You don't require servers, all you need to do is write the code and upload it to lamda. Which means, you can stop worrying about provisioning and managing those servers. The only thing Lamda requires to work is your code.

Automatic Scaling - Scaling is done automatically based on the size of the workload. It scales the application running the code in response to each trigger.

Metering on the second - You only pay for the amount of time that your code is running. Which means that you are not charged for any of the servers. The only payment required is for the amount of time the code is computed.

AWS Lamda is one of the services that falls under the 'Compute' domain of services that AWS provides.

Is AWS Lamda is good for long running tasks?

No, AWS Lambda is not suited for long-running tasks. It is an ideal option for quick and predictable workloads that lasts no longer than 900 seconds or 15 minutes in total. If the process not ended by that time, AWS Lambda stops it automatically.

Other Compute Services - Amazon EC2, Amazon EBS, Amazon Elastic load balancing, 

Lamda can be used to run code in response to certain events from other services.

Languages supported by Lamda - Node.js, Java, C Sharp, Go and Python.

There are a huge number of ways that AWS Lamda is used by businesses, some of them are..

Use Case

AWS Lamda is used to process images when it is uploaded to S3 bucket.






So these requests are given to a container to handle. A container contains the code the used has provided to satisfy the query.



You are only charged for the amount of time that a function is running inside these containers.

Backing up data

Lamda can be used to backing up data.



Copy data from 1 S3 bucket to another S3 bucket.

Steps to create a Lamda on S3

1) Create a S3 bucket.

2) Create a role that have access to S3 and Lamda.

3) Create a Lamda, select programming language and add the code snippet.

4) Create a trigger on S3 when any data added in S3 and add the lamda when event occurs.

5) When anything added to S3, our lamda will execute.










Comments

Popular posts from this blog

Java 8 : Find the number starts with 1 from a list of integers

Optional Vs Null Check

How to prevent Singleton Class from Reflection and Serialization