Compute: Lambda
Lambda service as a code runner in the cloud or a plugin service for other AWS services is discussed in this lesson together with our rule of thumb in using Lambda service.
Code runner in the cloud
If EC2 is a complete computer in the cloud, Lambda is a code runner in the cloud. With EC2 you get an operating system, a file system, access to the server’s hardware, etc. But with Lambda, you just upload some code and Amazon runs it for you. The beauty of Lambda is:
- It’s the simplest way to run code in the cloud.
- It abstracts away everything except for a function interface, which you get to fill in with the code you want to run.
Misuse of Lambda
We think Lambda is great—definitely one of the good parts of AWS—as long as you treat it as the simple code runner that it is. A problem we often see is that people sometimes mistake Lambda for a general-purpose application host. Unlike EC2, it is very hard to run a sophisticated piece of software on Lambda without making some very drastic changes to your application and accepting some significant new limitations from the ...