-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95c5502
commit 9d114ad
Showing
13 changed files
with
184 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
...otnet_clipackage/testdata/CustomRuntime6/WithDefaultsFile6/aws-lambda-tools-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Information": [ | ||
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", | ||
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", | ||
"dotnet lambda help", | ||
"All the command line options for the Lambda command can be specified in this file." | ||
], | ||
"profile": "", | ||
"region": "", | ||
"configuration": "Release", | ||
"framework": "net6.0", | ||
"function-runtime": "dotnet6", | ||
"function-memory-size": 256, | ||
"function-timeout": 30, | ||
"function-handler": "WithDefaultsFile::WithDefaultsFile.Function::FunctionHandler" | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/integration/workflows/dotnet_clipackage/testdata/CustomRuntime8/CustomRuntime6.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<AWSProjectType>Lambda</AWSProjectType> | ||
<AssemblyName>bootstrap</AssemblyName> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Amazon.Lambda.RuntimeSupport" Version="1.8.2" /> | ||
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" /> | ||
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" /> | ||
</ItemGroup> | ||
</Project> |
21 changes: 21 additions & 0 deletions
21
tests/integration/workflows/dotnet_clipackage/testdata/CustomRuntime8/Function.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Amazon.Lambda.Core; | ||
using Amazon.Lambda.RuntimeSupport; | ||
using Amazon.Lambda.Serialization.SystemTextJson; | ||
|
||
namespace CustomRuntime6; | ||
|
||
public class Function | ||
{ | ||
private static async Task Main(string[] args) | ||
{ | ||
Func<string, ILambdaContext, string> handler = FunctionHandler; | ||
await LambdaBootstrapBuilder.Create(handler, new DefaultLambdaJsonSerializer()) | ||
.Build() | ||
.RunAsync(); | ||
} | ||
|
||
public static string FunctionHandler(string input, ILambdaContext context) | ||
{ | ||
return input.ToUpper(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ration/workflows/dotnet_clipackage/testdata/CustomRuntime8/aws-lambda-tools-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Information": [ | ||
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", | ||
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", | ||
"dotnet lambda help", | ||
"All the command line options for the Lambda command can be specified in this file." | ||
], | ||
"profile": "", | ||
"region": "", | ||
"configuration": "Release", | ||
"function-runtime": "provided.al2", | ||
"function-memory-size": 256, | ||
"function-timeout": 30, | ||
"function-handler": "bootstrap", | ||
"msbuild-parameters": "--self-contained true" | ||
} |
27 changes: 27 additions & 0 deletions
27
tests/integration/workflows/dotnet_clipackage/testdata/WithDefaultsFile8/Function.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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.Json.JsonSerializer))] | ||
|
||
namespace WithDefaultsFile | ||
{ | ||
public class Function | ||
{ | ||
|
||
/// <summary> | ||
/// A simple function that takes a string and does a ToUpper | ||
/// </summary> | ||
/// <param name="input"></param> | ||
/// <param name="context"></param> | ||
/// <returns></returns> | ||
public string FunctionHandler(string input, ILambdaContext context) | ||
{ | ||
return input?.ToUpper(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ntegration/workflows/dotnet_clipackage/testdata/WithDefaultsFile8/WithDefaultsFile.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<AWSProjectType>Lambda</AWSProjectType> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" /> | ||
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.4.0" /> | ||
</ItemGroup> | ||
</Project> |
16 changes: 16 additions & 0 deletions
16
...ion/workflows/dotnet_clipackage/testdata/WithDefaultsFile8/aws-lambda-tools-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Information": [ | ||
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", | ||
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", | ||
"dotnet lambda help", | ||
"All the command line options for the Lambda command can be specified in this file." | ||
], | ||
"profile": "", | ||
"region": "", | ||
"configuration": "Release", | ||
"framework": "net8.0", | ||
"function-runtime": "dotnet8", | ||
"function-memory-size": 256, | ||
"function-timeout": 30, | ||
"function-handler": "WithDefaultsFile::WithDefaultsFile.Function::FunctionHandler" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters