Developer Guide

Running Serverless Web Applications Using AWS Lambda

The AWS SDK for .NET supports AWS Lambda, a compute service that lets you run code without provisioning or managing servers. AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second. You pay only for the compute time you consume - there is no charge when your code is not running. With AWS Lambda, you can run code for virtually any type of application or backend service - all with zero administration. AWS Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring and logging.

You can use AWS Lambda to run your code in response to events, such as changes to data in an Amazon S3 bucket or an Amazon DynamoDB table; to run your code in response to HTTP requests using Amazon API Gateway; or invoke your code using API calls made using AWS SDKs. With these capabilities, you can use Lambda to easily build data processing triggers for AWS services like Amazon S3 and Amazon DynamoDB process streaming data stored in Kinesis, or create your own back end that operates at AWS scale, performance, and security.

You can also build serverless applications composed of functions that are triggered by events and automatically deploy them using AWS CodePipeline and AWS CodeBuild. For more information, see Deploying Lambda-based Applications.

For more information about the AWS Lambda execution environment, see Amazon Lambda Execution Environment and Available Libraries. For information about how AWS Lambda determines compute resources required to execute your code, see Compute Requirements – Amazon Lambda Function Configuration.

The following examples demonstrate how to use the AWS SDK for .NET to create and use AWS Lambda applications.

The sample code is written in C#, but you can use the AWS SDK for .NET with any compatible language. The AWS SDK for .NET installs a set of C# project templates. So the simplest way to start this project is to open Visual Studio, and then choose File, New Project, AWS Samples, AWS Console Project.

Prerequisite Tasks

Before you begin, be sure that you have created an AWS account and set up your AWS credentials. For more information, see Getting Started with the AWS SDK for .NET.

For related API reference information, see Amazon.Lambda and Amazon.Lambda.Model in the AWS SDK for .NET API Reference.