using System.Collections.Generic; using System.Net; using Amazon.Lambda.Core; using Amazon.Lambda.APIGatewayEvents; // Assembly attribute to concert the Lambda function's JSON input to a .NET class. [assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))] namespace Api { public class Handlers { public APIGatewayHttpApiV2ProxyResponse Handler(APIGatewayHttpApiV2ProxyRequest request) { return new APIGatewayHttpApiV2ProxyResponse { StatusCode = (int)HttpStatusCode.OK, Body = $"Hello, World! Your request was received at {request.RequestContext.Time}.", Headers = new Dictionary { { "Content-Type", "application/json" } } }; } } }