File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ BUILD: docker run --rm -v "$PWD"/test:/app microsoft/dotnet: sdk /usr/share/dotnet/dotnet publish /app -c Release -o pub
2+ RUN: docker run --rm -v "$PWD"/test/pub:/var/task lambci/lambda: dotnetcore2 .0 test::test.Function::FunctionHandler "some"
Original file line number Diff line number Diff line change 1+ /*
2+ BUILD: docker run --rm -v "$PWD"/test:/app microsoft/dotnet:sdk /usr/share/dotnet/dotnet publish /app -c Release -o pub
3+ RUN: docker run --rm -v "$PWD"/test/pub:/var/task lambci/lambda:dotnetcore2.0 test::test.Function::FunctionHandler "some"
4+ */
5+
6+ using System ;
7+ using System . Collections . Generic ;
8+ using System . Linq ;
9+ using System . Threading . Tasks ;
10+ using Amazon . Lambda . Core ;
11+ using System . IO ;
12+
13+ // Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
14+ [ assembly: LambdaSerializer ( typeof ( Amazon . Lambda . Serialization . Json . JsonSerializer ) ) ]
15+
16+ namespace test
17+ {
18+ public class Function
19+ {
20+
21+ public string FunctionHandler ( Stream stream , ILambdaContext context )
22+ {
23+ context . Logger . Log ( "Log Hello world" ) ;
24+ return "Hallo world!" ;
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <TargetFramework >netcoreapp2.0</TargetFramework >
5+ <GenerateRuntimeConfigurationFiles >true</GenerateRuntimeConfigurationFiles >
6+ </PropertyGroup >
7+
8+ <ItemGroup >
9+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 1.0.0" />
10+ <PackageReference Include =" Amazon.Lambda.Serialization.Json" Version =" 1.1.0" />
11+ </ItemGroup >
12+
13+ <ItemGroup >
14+ <DotNetCliToolReference Include =" Amazon.Lambda.Tools" Version =" 2.0.1" />
15+ </ItemGroup >
16+
17+ </Project >
You can’t perform that action at this time.
0 commit comments