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
-
3
1
[ assembly: LambdaSerializer ( typeof ( Amazon . Lambda . Serialization . SystemTextJson . DefaultLambdaJsonSerializer ) ) ]
4
- namespace AwsDotnetCsharp
2
+
3
+ namespace AwsDotnetCsharp ;
4
+ public class Handler
5
5
{
6
- public class Handler
6
+ public Response Hello ( Request request )
7
7
{
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 ) ;
12
9
}
10
+ }
13
11
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 ; }
18
16
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
+ }
24
23
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 ; }
31
29
}
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp3.1</TargetFramework >
5
- <GenerateRuntimeConfigurationFiles >true</GenerateRuntimeConfigurationFiles >
4
+ <TargetFramework >net6.0</TargetFramework >
6
5
<AssemblyName >CsharpHandlers</AssemblyName >
7
6
<PackageId >aws-csharp</PackageId >
7
+ <GenerateRuntimeConfigurationFiles >true</GenerateRuntimeConfigurationFiles >
8
+ <PublishReadyToRun >true</PublishReadyToRun >
9
+ <ImplicitUsings >enable</ImplicitUsings >
8
10
</PropertyGroup >
9
11
10
12
<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" />
13
19
</ItemGroup >
14
20
15
21
</Project >
Original file line number Diff line number Diff line change 1
1
dotnet 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 8
8
fi
9
9
10
10
dotnet 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'
22
22
23
23
provider :
24
24
name : aws
25
- runtime : dotnetcore3.1
25
+ runtime : dotnet6
26
26
27
27
# you can overwrite defaults here
28
28
# stage: dev
@@ -59,7 +59,7 @@ functions:
59
59
60
60
# you can add packaging information here
61
61
package :
62
- artifact : bin/Release/netcoreapp3.1 /hello.zip
62
+ artifact : bin/Release/net6.0 /hello.zip
63
63
# exclude:
64
64
# - exclude-me.js
65
65
# - exclude-me-dir/**
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp3.1 </TargetFramework >
4
+ <TargetFramework >net6.0 </TargetFramework >
5
5
<AssemblyName >FsharpHandlers</AssemblyName >
6
6
<PackageId >aws-fsharp</PackageId >
7
+ <PublishReadyToRun >true</PublishReadyToRun >
7
8
</PropertyGroup >
8
9
9
10
<ItemGroup >
10
11
<Compile Include =" Handler.fs" />
11
12
</ItemGroup >
12
13
13
14
<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 " />
16
17
</ItemGroup >
17
18
18
19
</Project >
Original file line number Diff line number Diff line change 1
1
dotnet restore
2
- dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1
2
+ dotnet tool install -g Amazon.Lambda.Tools --framework net6.0
3
3
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 8
8
fi
9
9
10
10
dotnet 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'
22
22
23
23
provider :
24
24
name : aws
25
- runtime : dotnetcore3.1
25
+ runtime : dotnet6
26
26
27
27
# you can overwrite defaults here
28
28
# stage: dev
@@ -52,7 +52,7 @@ provider:
52
52
53
53
# you can add packaging information here
54
54
package :
55
- artifact : bin/Release/netcoreapp3.1 /deploy-package.zip
55
+ artifact : bin/Release/net6.0 /deploy-package.zip
56
56
# exclude:
57
57
# - exclude-me.js
58
58
# - exclude-me-dir/**
You can’t perform that action at this time.
0 commit comments