testapps/ImageBasedProjects/ServerlessTemplateExamples/UseDockerMetadata/Function.cs (17 lines of code) (raw):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace UseDockerMetadata
{
public class Function
{
public string FunctionHandler(string input, ILambdaContext context)
{
context.Logger.LogLine("UseDockerMetadata");
return input?.ToUpper();
}
}
}