Skip to main content

Amazon Lambda .NET Core support - API Gateway package.

Total Downloads
85.4M
85,439,631
Published
Aug 17, 2026
3mo ago

Get Started

dotnet add package Amazon.Lambda.APIGatewayEvents --version 3.0.1
ProductVersions
.NET
net10.0net8.0

README

Amazon.Lambda.APIGatewayEvents

This package contains classes that can be used as input types for Lambda functions that process Amazon API Gateway events.

API Gateway events consist of a request that was routed to a Lambda function by API Gateway. When this happens, API Gateway expects the result of the function to be the response that API Gateway should respond with. To see a more detailed example of this, take a look at the Amazon.Lambda.AspNetCoreServer README.md file.

Classes

Class Description
APIGatewayProxyRequest Represents proxy request coming from REST API, HTTP API payload format 1.0 or WebSocket API.
APIGatewayProxyResponse The return object for functions handling requests for REST API, HTTP API payload format 1.0 or WebSocket API.
APIGatewayHttpApiV2ProxyRequest Represents proxy request coming from HTTP API payload format 2.0.
APIGatewayHttpApiV2ProxyResponse The return object for functions handling requests for HTTP API payload format 2.0.

Sample Functions

The following is a sample class and Lambda function that receives Amazon API Gateway event record data as an input, writes some of the record data to CloudWatch Logs, and responds with a 200 status and the same body as the request. (Note that by default anything written to Console will be logged as CloudWatch Logs events.)

Function handler

public class Function
{
    public APIGatewayProxyResponse Handler(APIGatewayProxyRequest apigProxyEvent)
    {
        Console.WriteLine($"Processing request data for request {apigProxyEvent.RequestContext.RequestId}.");
        Console.WriteLine($"Body size = {apigProxyEvent.Body.Length}.");
        var headerNames = string.Join(", ", apigProxyEvent.Headers.Keys);
        Console.WriteLine($"Specified headers = {headerNames}.");

        return new APIGatewayProxyResponse
        {
            Body = apigProxyEvent.Body,
            StatusCode = 200,
        };
    }
}

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.