AWS Lambdas Rock

We continue espousing the benefits of serverless applications, which enable us to save time & money and release features frequently. As Webapper builds a growing portfolio of serverless applications — FaaS, as we’ve outlined before — we are continually embracing AWS Lambdas. When we send code to an AWS Lambda, we deploy it in a container that AWS creates, deploys, and manages. We essentially run code without having to think about servers or clusters, paying only for the compute time we use. That is, Lambda performs all operational & administrative activities for us: capacity provisioning, security patching for compute resources, deploying the code, monitoring, and logging. Today, we’ll share some of our thoughts and experiences on AWS Lambdas so you can see if they fit for any of your cloud application development projects.

Why We Think AWS Lambdas Rock

No infrastructure to provision

When using Lambda, you are responsible only for your code.

Automatic, continuous scaling

Lambda performs operational and administrative activities on your behalf, including managing capacity, monitoring, and logging your Lambda functions.

Performance at any scale

Each lambda triggers individually, scaling with the size of the workload — from a few per day to thousands per second.

Optimized costs (metering)

You only pay for the compute time you use, so you’re never paying for over-provisioned infrastructure.

Example Uses of Lambdas

Sending notifications

You could send any type of notification in real time based on system-defined triggers. For example, a Lambda could send a text message at the close of business with the daily revenue report by source.

Performing daily tasks

You could deploy a simple Python library to accomplish basic daily functions like report generation or automated backups.

Processing files

If you need to perform functions like generating thumbnails, resizing images, concatenating text files, AWS Lambdas are invaluable. With automated scalability, the number of files will positively impact how cost-effective this function will be.

Updating databases

You can easily insert, update and delete data in a Dynamo DB table, or DynamoDB can trigger AWS Lambda whenever data is added, modified, and deleted.

Processing logs

AWS Lambda can be used to process log files, such as CloudTrail or CloudWatch.

Chatbots

As chatbots become more essential in business operations, you can set create Lambdas to trigger actions from within the bot. For example, a Lambda could add an event to a sales calendar based on inputs from a chat guest.

Boundaries of AWS Lambda

As of this writing, there are a few AWS Lambda boundaries to factor into development plans.

Runtime Environment Limitations

  • Disk space (ephemeral) is limited to 512 MB.
  • Default deployment package size is 50 MB.
  • Memory range is from 128 to 3008 MB.
  • Functions can run up to 15 minutes per execution. You can set a timeout between 1 second and 15 minutes.

Request Limitations

  • Request and response (synchronous calls) body payload size can be up to to 6 MB.
  • Event request (asynchronous calls) body can be up to 128 KB.

And then we have a few other considerations.

Languages

AWS Lambda natively supports Java, Go, PowerShell, Node.js, C#, Python, and Ruby code, and provides a Runtime API that allows you to use other programming languages too.

States

Stateless functions enable AWS Lambda to launch as many copies of the function as needed to scale to meet incoming events.

Network Connections

Inbound network connections are blocked by AWS Lambda, and only TCP/IP and UDP/IP sockets are supported for outbound connections.

Yes, AWS Lambdas Rock

We’re sold. Although they don’t solve every software development problem, AWS Lambdas encourage us to think about the best design patterns for cloud computing. If “the world is your (API) oyster…”, then serverless solutions and modern applications are going to continue their rapid ascent. As we explained many times in our resources, such architectures enable faster development – team members can work on small components without having to understand a whole monolithic system. The small components end up being higher quality too, because they can be tested, especially with automation. And then there’s the velocity gained by building more software in less time. That speed leads to better user engagement and customer experience. Ultimately, we think the model brought by AWS Lambdas is a formula for long-term software success.

Are AWS Lambdas Right for Your Next Project?

Contact Webapper for a free consultation. We’ll help you start on the right foundation.

Talk to an Expert