File tree Expand file tree Collapse file tree 9 files changed +47
-42
lines changed Expand file tree Collapse file tree 9 files changed +47
-42
lines changed Original file line number Diff line number Diff line change 1- using Amazon . Lambda . Core ;
2-
31[ assembly: LambdaSerializer ( typeof ( Amazon . Lambda . Serialization . SystemTextJson . DefaultLambdaJsonSerializer ) ) ]
4- namespace AwsDotnetCsharp
2+
3+ namespace AwsDotnetCsharp ;
4+ public class Handler
55{
6- public class Handler
6+ public Response Hello ( Request request )
77 {
8- public Response Hello ( Request request )
9- {
10- return new Response ( "Go Serverless v1.0! Your function executed successfully!" , request ) ;
11- }
8+ return new Response ( "Go Serverless v1.0! Your function executed successfully!" , request ) ;
129 }
10+ }
1311
14- public class Response
15- {
16- public string Message { get ; set ; }
17- public Request Request { get ; set ; }
12+ public class Response
13+ {
14+ public string Message { get ; set ; }
15+ public Request Request { get ; set ; }
1816
19- public Response ( string message , Request request ) {
20- Message = message ;
21- Request = request ;
22- }
23- }
17+ public Response ( string message , Request request )
18+ {
19+ Message = message ;
20+ Request = request ;
21+ }
22+ }
2423
25- public class Request
26- {
27- public string Key1 { get ; set ; }
28- public string Key2 { get ; set ; }
29- public string Key3 { get ; set ; }
30- }
24+ public class Request
25+ {
26+ public string Key1 { get ; set ; }
27+ public string Key2 { get ; set ; }
28+ public string Key3 { get ; set ; }
3129}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1</TargetFramework >
5- <GenerateRuntimeConfigurationFiles >true</GenerateRuntimeConfigurationFiles >
4+ <TargetFramework >net6.0</TargetFramework >
65 <AssemblyName >CsharpHandlers</AssemblyName >
76 <PackageId >aws-csharp</PackageId >
7+ <GenerateRuntimeConfigurationFiles >true</GenerateRuntimeConfigurationFiles >
8+ <PublishReadyToRun >true</PublishReadyToRun >
9+ <ImplicitUsings >enable</ImplicitUsings >
810 </PropertyGroup >
911
1012 <ItemGroup >
11- <PackageReference Include =" Amazon.Lambda.Core" Version =" 1.1.0" />
12- <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.0.1" />
13+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 2.1.0" />
14+ <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.2.0" />
15+ </ItemGroup >
16+
17+ <ItemGroup >
18+ <Using Include =" Amazon.Lambda.Core" />
1319 </ItemGroup >
1420
1521</Project >
Original file line number Diff line number Diff line change 11dotnet restore
2- dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1
3- dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1 /hello.zip
2+ dotnet tool install -g Amazon.Lambda.Tools --framework net6.0
3+ dotnet lambda package --configuration Release --framework net6.0 --output-package bin/Release/net6.0 /hello.zip
Original file line number Diff line number Diff line change 88fi
99
1010dotnet restore
11- dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1
12- dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1 /hello.zip
11+ dotnet tool install -g Amazon.Lambda.Tools --framework net6.0
12+ dotnet lambda package --configuration Release --framework net6.0 --output-package bin/Release/net6.0 /hello.zip
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ frameworkVersion: '3'
2222
2323provider :
2424 name : aws
25- runtime : dotnetcore3.1
25+ runtime : dotnet6
2626
2727# you can overwrite defaults here
2828# stage: dev
@@ -59,7 +59,7 @@ functions:
5959
6060 # you can add packaging information here
6161 package :
62- artifact : bin/Release/netcoreapp3.1 /hello.zip
62+ artifact : bin/Release/net6.0 /hello.zip
6363 # exclude:
6464 # - exclude-me.js
6565 # - exclude-me-dir/**
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.1 </TargetFramework >
4+ <TargetFramework >net6.0 </TargetFramework >
55 <AssemblyName >FsharpHandlers</AssemblyName >
66 <PackageId >aws-fsharp</PackageId >
7+ <PublishReadyToRun >true</PublishReadyToRun >
78 </PropertyGroup >
89
910 <ItemGroup >
1011 <Compile Include =" Handler.fs" />
1112 </ItemGroup >
1213
1314 <ItemGroup >
14- <PackageReference Include =" Amazon.Lambda.Core" Version =" 1 .1.0" />
15- <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.0.1 " />
15+ <PackageReference Include =" Amazon.Lambda.Core" Version =" 2 .1.0" />
16+ <PackageReference Include =" Amazon.Lambda.Serialization.SystemTextJson" Version =" 2.2.0 " />
1617 </ItemGroup >
1718
1819</Project >
Original file line number Diff line number Diff line change 11dotnet restore
2- dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1
2+ dotnet tool install -g Amazon.Lambda.Tools --framework net6.0
33
4- dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1 /deploy-package.zip
4+ dotnet lambda package --configuration Release --framework net6.0 --output-package bin/Release/net6.0 /deploy-package.zip
Original file line number Diff line number Diff line change 88fi
99
1010dotnet restore
11- dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1
12- dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1 /deploy-package.zip
11+ dotnet tool install -g Amazon.Lambda.Tools --framework net6.0
12+ dotnet lambda package --configuration Release --framework net6.0 --output-package bin/Release/net6.0 /deploy-package.zip
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ frameworkVersion: '3'
2222
2323provider :
2424 name : aws
25- runtime : dotnetcore3.1
25+ runtime : dotnet6
2626
2727# you can overwrite defaults here
2828# stage: dev
@@ -52,7 +52,7 @@ provider:
5252
5353# you can add packaging information here
5454package :
55- artifact : bin/Release/netcoreapp3.1 /deploy-package.zip
55+ artifact : bin/Release/net6.0 /deploy-package.zip
5656# exclude:
5757# - exclude-me.js
5858# - exclude-me-dir/**
You can’t perform that action at this time.
0 commit comments