AWS 101: Why You Should be Deploying AWS Lambda to Run Code

Running code can get tricky and time-consuming. After all, you need to provision and manage your servers to make it happen, right? Not if you’re in the cloud and are deploying AWS Lambda. You don’t even have to think about servers.

Let’s take a look at how deploying AWS Lambda for running code and building applications in a serverless computing environment can be a game-changer in this latest chapter of our AWS 101 series.

What is AWS Lambda?

This highly available, serverless compute service runs your code in response to such events as HTTP requests, object modifications in Amazon S3 buckets, state transitions or updates on a compute infrastructure.

Hand holding smartphone with media icons and symbol collectionYou can use Lambda to extend your AWS services or create your own back-end services and applications that operate with the security, performance and scale that AWS cloud delivers.

Lambda takes care of your compute fleet with balanced memory, CPU and other resources. You have zero administration responsibilities. You can set up your code to automatically trigger from AWS services or be called directly from any web or mobile app. Lambda does the rest to run and scale it with high availability.

AWS Lambda manages and maintains your underlying compute resources. Some of these include monitoring fleet health, patching security issues, deploying code, provisioning capacity and more.

How Does AWS Lambda Work?

When you use Lambda, your code is ready to run as soon as it is triggered. All you have to do is upload it; Lambda pretty much takes care of the rest by running, scaling and maintaining it. It natively supports Java, Go, PowerShell, Node.js, C#, Python and Ruby code. It also offers a Runtime API to assist you in using other programming languages.

The code you run on Lambda is known as a “Lambda function.” You run these to process the kinds of events I’ve mentioned above.

There are a few things you should know about Lambda functions. First, functions include not only your code but also such configuration information as function name and resource requirements. They are “stateless,” which means they aren’t connected to the underlying infrastructure, so Lambda can launch multiple copies of the function to scale with incoming events.

Second, once you upload the code, you can associate your Lambda function with different AWS resources. When you create a function, Lambda automatically provides an execution role with minimal permissions to access various services like Amazon S3 and Amazon DynamoDB, for example. You can also access permissions in the Amazon Identity and Access Management (IAM) console for more granular control.

Why Should I be Using AWS Lambda?

What does this mean for you? Here’s a look at some of the reasons why using AWS Lambda to run code in a serverless computing environment is something to consider:

You don’t have to manage servers.

Because AWS Lambda automatically runs your code once you write it and upload it, you don’t need to worry about servers, provisioning or maintenance.

continuous scalingIt provides continuous scaling.

AWS Lambda runs your code in response to triggers and scales your application as needed. The code runs parallel to process each trigger individually. This means it scales with the size of the workload.

You get subsecond metering.

Pay only for the compute time consumed. You’re charged for every 100ms your code executes and the number of times it’s triggered.

AWS Lambda delivers consistent performance.

You are able to choose the right memory size for your function to optimize code execution time and enable “Provisional Concurrency” to keep functions initialized and ready to respond quickly.

The reasons to take a hard look at AWS Lambda are plentiful, especially if you want to write code but not manage it (or servers). It’s a vital Amazon Web Services tool to consider as you work your way through our AWS 101 series, Stay tuned for more AWS insight and thanks for reading!

AWS 101: An Introduction to Modern Cloud Computing

AWS 101: What is Amazon WorkSpaces?

AWS 101: How Does Amazon EC2 Work in Cloud Computing?

AWS 101: What is Amazon S3 and Why Should I Use It?

AWS 101: How AWS Identity and Access Management (IAM) Works

AWS 101: How AWS Cloud Security Securely Protects Your Data

AWS 101: Using Auto Scaling to Manage Infrastructure

Post Your Comments


SEARCH Blog

Kubernetes assessment

MEET THE AUTHOR

Gerald Van Guilder, Senior Cloud Architect

Gerald Van Guilder, Senior Cloud Architect

Gerald (Jerry) Van Guilder specializes in GCP and AWS architecture, deployments/implementations and migrations. One of the many things that he enjoys is enabling clients to feel empowered not only by technologies but also in the skill/knowledge transfer that transpires during the course of an engagement. Jerry lives (and works) in Syracuse, New York, with his wife and two pups.

MORE POSTS BY GERALD VAN GUILDER, SENIOR CLOUD ARCHITECT

Discuss the cloud with an expert

Onix has expertise with AWS, GCP and multi-cloud environments. Let's discuss your workloads.

Get a Cloud Assessment