Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Latest commit

 

History

History
19 lines (13 loc) · 724 Bytes

File metadata and controls

19 lines (13 loc) · 724 Bytes

Minimal Top-Level Function

The Minimal Top-Level project consists of the absolute least amount of code required by an invocable Lambda function using top-level statements.

The purpose of this project is to establish a baseline for other .NET Lambda functions. Measurements of this Lambda function represent the lower bound of the AWS Lambda runtime for .NET projects using top-level statements.

Code

using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.Serialization.SystemTextJson;

await LambdaBootstrapBuilder.Create(Handler, new DefaultLambdaJsonSerializer())
    .Build()
    .RunAsync();

Task Handler(Stream request, ILambdaContext context) => Task.CompletedTask;