Amazon.Lambda.APIGatewayEvents 2.7.0
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,
};
}
}
Showing the top 20 packages that depend on Amazon.Lambda.APIGatewayEvents.
Packages | Downloads |
---|---|
Amazon.Lambda.AspNetCoreServer
Amazon.Lambda.AspNetCoreServer makes it easy to run ASP.NET Core Web API applications as AWS Lambda functions.
|
16 |
Amazon.Lambda.AspNetCoreServer
Amazon.Lambda.AspNetCoreServer makes it easy to run ASP.NET Core Web API applications as AWS Lambda functions.
|
10 |
Amazon.Lambda.AspNetCoreServer
Amazon.Lambda.AspNetCoreServer makes it easy to run ASP.NET Core Web API applications as AWS Lambda functions.
|
9 |
Amazon.Lambda.AspNetCoreServer
Amazon.Lambda.AspNetCoreServer makes it easy to run ASP.NET Core Web API applications as AWS Lambda functions.
|
8 |
.NET Core 3.1
- No dependencies.
.NET 8.0
- No dependencies.
.NET Standard 2.0
- Newtonsoft.Json (>= 13.0.1)
Version | Downloads | Last updated |
---|---|---|
2.7.1 | 6 | 08/09/2024 |
2.7.0 | 10 | 12/07/2023 |
2.6.0 | 8 | 04/04/2023 |
2.5.0 | 8 | 07/20/2022 |
2.4.1 | 8 | 09/12/2022 |
2.4.0 | 24 | 11/04/2021 |
2.3.0 | 8 | 09/12/2022 |
2.2.0 | 9 | 09/12/2022 |
2.1.0 | 8 | 12/30/2020 |
2.0.0 | 6 | 09/12/2022 |
1.3.0 | 5 | 09/12/2022 |
1.2.0 | 6 | 08/29/2023 |
1.1.3 | 8 | 09/13/2022 |
1.1.2 | 9 | 09/13/2022 |
1.1.1 | 6 | 08/28/2023 |
1.1.0 | 9 | 09/12/2022 |
1.0.2 | 7 | 08/28/2023 |
1.0.1 | 7 | 08/31/2023 |
1.0.0 | 7 | 08/30/2023 |