using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.Serialization.Json;
using System;
using System.Threading.Tasks;
namespace BlueprintBaseName._1
{
public class Function
{
///
/// The main entry point for the custom runtime.
///
///
private static async Task Main(string[] args)
{
Func func = FunctionHandler;
using(var handlerWrapper = HandlerWrapper.GetHandlerWrapper(func, new JsonSerializer()))
using(var bootstrap = new LambdaBootstrap(handlerWrapper))
{
await bootstrap.RunAsync();
}
}
///
/// A simple function that takes a string and does a ToUpper
///
/// To use this handler to respond to an AWS event, reference the appropriate package from
/// https://github.com/aws/aws-lambda-dotnet#events
/// and change the string input parameter to the desired event type.
///
///
///
///
public static string FunctionHandler(string input, ILambdaContext context)
{
return input?.ToUpper();
}
}
}