From 016f28afb2b3c08a57e5c377dca9d6ca9d421863 Mon Sep 17 00:00:00 2001 From: Jason Taylor Date: Wed, 30 Jul 2025 12:55:50 +1000 Subject: [PATCH 1/2] Clone SQSLambda_3 --- .../AWSLambda-SQS.StartupProjects.txt | 1 + .../SQSLambda_4/AWSLambda-SQS.sln | 44 ++++++ .../SQSLambda_4/Messages/Messages.csproj | 12 ++ .../SQSLambda_4/Messages/ResponseMessage.cs | 3 + .../SQSLambda_4/Messages/TriggerMessage.cs | 3 + .../SQSLambda_4/RegularEndpoint/Program.cs | 30 ++++ .../RegularEndpoint/RegularEndpoint.csproj | 17 +++ .../RegularEndpoint/ResponseMessageHandler.cs | 14 ++ .../ServerlessEndpoint/HttpLambda.cs | 24 +++ .../Properties/launchSettings.json | 10 ++ .../ServerlessEndpoint.csproj | 24 +++ .../ServerlessEndpoint/SqsLambda.cs | 27 ++++ .../SQSLambda_4/ServerlessEndpoint/Startup.cs | 24 +++ .../TriggerMessageHandler.cs | 18 +++ .../aws-lambda-tools-defaults.json | 16 ++ .../ServerlessEndpoint/serverless.template | 137 ++++++++++++++++++ 16 files changed, 404 insertions(+) create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.StartupProjects.txt create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.sln create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/ResponseMessage.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/TriggerMessage.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/Program.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/ResponseMessageHandler.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/HttpLambda.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Properties/launchSettings.json create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/SqsLambda.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Startup.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/TriggerMessageHandler.cs create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/aws-lambda-tools-defaults.json create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/serverless.template diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.StartupProjects.txt b/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.StartupProjects.txt new file mode 100644 index 00000000000..0ea702707fa --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.StartupProjects.txt @@ -0,0 +1 @@ +RegularEndpoint\RegularEndpoint.csproj \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.sln b/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.sln new file mode 100644 index 00000000000..c8d0258f91d --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/AWSLambda-SQS.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29728.190 +MinimumVisualStudioVersion = 15.0.26730.12 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerlessEndpoint", "ServerlessEndpoint\ServerlessEndpoint.csproj", "{D9FB3A23-D74F-4754-9A22-ACF829EEEB70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RegularEndpoint", "RegularEndpoint\RegularEndpoint.csproj", "{06754C55-CA74-4F17-9472-244B8A3FEB1E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages", "Messages\Messages.csproj", "{1BEFE981-8E75-4152-B6E3-8D488AE8530F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|x64.ActiveCfg = Debug|Any CPU + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|x64.Build.0 = Debug|Any CPU + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|x86.ActiveCfg = Debug|Any CPU + {D9FB3A23-D74F-4754-9A22-ACF829EEEB70}.Debug|x86.Build.0 = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|x64.ActiveCfg = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|x64.Build.0 = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|x86.ActiveCfg = Debug|Any CPU + {06754C55-CA74-4F17-9472-244B8A3FEB1E}.Debug|x86.Build.0 = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|x64.ActiveCfg = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|x64.Build.0 = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|x86.ActiveCfg = Debug|Any CPU + {1BEFE981-8E75-4152-B6E3-8D488AE8530F}.Debug|x86.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6C66C18C-5075-4811-AF40-2997E8863F3B} + EndGlobalSection +EndGlobal diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj new file mode 100644 index 00000000000..2b011d6053c --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj @@ -0,0 +1,12 @@ + + + + net8.0 + 12.0 + + + + + + + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/ResponseMessage.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/ResponseMessage.cs new file mode 100644 index 00000000000..24410178ca4 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/ResponseMessage.cs @@ -0,0 +1,3 @@ +using NServiceBus; + +public class ResponseMessage : IMessage; \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/TriggerMessage.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/TriggerMessage.cs new file mode 100644 index 00000000000..d08a1b561be --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/TriggerMessage.cs @@ -0,0 +1,3 @@ +using NServiceBus; + +public class TriggerMessage : IMessage; \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/Program.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/Program.cs new file mode 100644 index 00000000000..2e29750c768 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/Program.cs @@ -0,0 +1,30 @@ +using System; +using NServiceBus; + +Console.Title = "RegularEndpoint"; + +var endpointConfiguration = new EndpointConfiguration("RegularEndpoint"); + +endpointConfiguration.UseSerialization(); +endpointConfiguration.UseTransport(); + +var endpointInstance = await Endpoint.Start(endpointConfiguration); + +Console.WriteLine("Press [ENTER] to send a message to the serverless endpoint queue."); +Console.WriteLine("Press [Esc] to exit."); + +while (true) +{ + var key = Console.ReadKey(); + Console.WriteLine(); + switch (key.Key) + { + case ConsoleKey.Enter: + await endpointInstance.Send("ServerlessEndpoint", new TriggerMessage()); + Console.WriteLine("Message sent to the serverless endpoint queue."); + break; + case ConsoleKey.Escape: + await endpointInstance.Stop(); + return; + } +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj new file mode 100644 index 00000000000..a019c3829bb --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + Exe + 12.0 + + + + + + + + + + + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/ResponseMessageHandler.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/ResponseMessageHandler.cs new file mode 100644 index 00000000000..f55b9cecee2 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/ResponseMessageHandler.cs @@ -0,0 +1,14 @@ +using System.Threading.Tasks; +using NServiceBus; +using NServiceBus.Logging; + +public class ResponseMessageHandler : IHandleMessages +{ + static readonly ILog Log = LogManager.GetLogger(); + + public Task Handle(ResponseMessage message, IMessageHandlerContext context) + { + Log.Info($"Handling {nameof(ResponseMessage)} in RegularEndpoint"); + return Task.CompletedTask; + } +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/HttpLambda.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/HttpLambda.cs new file mode 100644 index 00000000000..f4001313afd --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/HttpLambda.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using Amazon.Lambda.Annotations; +using Amazon.Lambda.Annotations.APIGateway; +using Amazon.Lambda.Core; +using Amazon.Lambda.Serialization.SystemTextJson; +using NServiceBus; + +// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. +[assembly:LambdaSerializer(typeof(DefaultLambdaJsonSerializer))] + +namespace LambdaFunctions; + +public class HttpLambda(IAwsLambdaSQSEndpoint serverlessEndpoint) +{ + #region HttpFunctionHandler + [LambdaFunction(Policies = "AWSLambda_FullAccess, AmazonSQSFullAccess")] + [HttpApi(LambdaHttpMethod.Get, "/")] + public async Task HttpGetHandler(ILambdaContext context) + { + await serverlessEndpoint.Send(new TriggerMessage(), context); + return $"{nameof(TriggerMessage)} sent."; + } + #endregion +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Properties/launchSettings.json b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Properties/launchSettings.json new file mode 100644 index 00000000000..c1fabf8f854 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "Mock Lambda Test Tool": { + "commandName": "Executable", + "commandLineArgs": "--port 5050", + "workingDirectory": ".\\bin\\$(Configuration)\\net8.0", + "executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-8.0.exe" + } + } +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj new file mode 100644 index 00000000000..5e372472158 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + true + Lambda + 12.0 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/SqsLambda.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/SqsLambda.cs new file mode 100644 index 00000000000..bde0f406374 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/SqsLambda.cs @@ -0,0 +1,27 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Amazon.Lambda.Annotations; +using Amazon.Lambda.Annotations.SQS; +using Amazon.Lambda.Core; +using Amazon.Lambda.SQSEvents; +using NServiceBus; + +namespace LambdaFunctions; + +public class SqsLambda(IAwsLambdaSQSEndpoint serverlessEndpoint) +{ + #region SqsFunctionHandler + [LambdaFunction] + [SQSEvent("arn:aws:sqs:region:account-id:ServerlessEndpoint")] + public async Task FunctionHandler(SQSEvent evnt, ILambdaContext context) + { + using var cancellationTokenSource = + new CancellationTokenSource(context.RemainingTime.Subtract(DefaultRemainingTimeGracePeriod)); + + await serverlessEndpoint.Process(evnt, context, cancellationTokenSource.Token); + } + #endregion + + static readonly TimeSpan DefaultRemainingTimeGracePeriod = TimeSpan.FromSeconds(10); +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Startup.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Startup.cs new file mode 100644 index 00000000000..faa34b6db4e --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/Startup.cs @@ -0,0 +1,24 @@ +using Microsoft.Extensions.DependencyInjection; +using NServiceBus; +using NServiceBus.AwsLambda.SQS; + +namespace LambdaFunctions; + +#region EndpointSetup +[Amazon.Lambda.Annotations.LambdaStartup] +public class Startup +{ + public void ConfigureServices(IServiceCollection services) + { + services.AddAwsLambdaSQSEndpoint("ServerlessEndpoint", (endpointConfiguration, _) => + { + endpointConfiguration.UseSerialization(); + + var routing = endpointConfiguration.RoutingSettings; + + routing.RouteToEndpoint(typeof(TriggerMessage), "ServerlessEndpoint"); + routing.RouteToEndpoint(typeof(ResponseMessage), "RegularEndpoint"); + }); + } +} +#endregion \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/TriggerMessageHandler.cs b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/TriggerMessageHandler.cs new file mode 100644 index 00000000000..3d1d5f3b9ee --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/TriggerMessageHandler.cs @@ -0,0 +1,18 @@ +using System.Threading.Tasks; +using NServiceBus; +using NServiceBus.Logging; + +namespace LambdaFunctions; + +#region TriggerMessageHandler +class TriggerMessageHandler : IHandleMessages +{ + static readonly ILog Log = LogManager.GetLogger(); + + public async Task Handle(TriggerMessage message, IMessageHandlerContext context) + { + Log.Info($"Handling {nameof(TriggerMessage)} in ServerlessEndpoint."); + await context.Send(new ResponseMessage()); + } +} +#endregion diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/aws-lambda-tools-defaults.json b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/aws-lambda-tools-defaults.json new file mode 100644 index 00000000000..9674dfd454d --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/aws-lambda-tools-defaults.json @@ -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": "default", + "region": "ap-southeast-2", + "configuration": "Debug", + "framework": "net8.0", + "template": "serverless.template", + "template-parameters": "", + "stack-name": "nservicebus-aws-lambda-sample-jtd", + "s3-bucket": "nservicebus-aws-lambda-sample-jtd" +} \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/serverless.template b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/serverless.template new file mode 100644 index 00000000000..20474517c46 --- /dev/null +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/serverless.template @@ -0,0 +1,137 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Transform": "AWS::Serverless-2016-10-31", + "Description": "Template that creates an SQS queue and a function that is invoked when a new message arrives. This template is partially managed by Amazon.Lambda.Annotations (v1.7.0.0).", + "Resources": { + "ErrorQueue": { + "Properties": { + "QueueName": "error" + }, + "Type": "AWS::SQS::Queue" + }, + "RegularEndpointQueue": { + "Properties": { + "QueueName": "RegularEndpoint" + }, + "Type": "AWS::SQS::Queue" + }, + "RegularEndpointDelayQueue": { + "Type": "AWS::SQS::Queue", + "Properties": { + "QueueName": "RegularEndpoint-delay.fifo", + "FifoQueue": "true", + "DelaySeconds": 900 + } + }, + "ServerlessEndpointQueue": { + "Properties": { + "QueueName": "ServerlessEndpoint" + }, + "Type": "AWS::SQS::Queue" + }, + "ServerlessEndpointDelayQueue": { + "Type": "AWS::SQS::Queue", + "Properties": { + "QueueName": "ServerlessEndpoint-delay.fifo", + "FifoQueue": "true", + "DelaySeconds": 900 + } + }, + "LambdaFunctionsHttpLambdaHttpGetHandlerGenerated": { + "Type": "AWS::Serverless::Function", + "Metadata": { + "Tool": "Amazon.Lambda.Annotations", + "SyncedEvents": [ + "RootGet" + ], + "SyncedEventProperties": { + "RootGet": [ + "Path", + "Method" + ] + } + }, + "Properties": { + "Runtime": "dotnet8", + "CodeUri": ".", + "MemorySize": 256, + "Timeout": 30, + "Policies": [ + "AWSLambda_FullAccess", + "AmazonSQSFullAccess" + ], + "PackageType": "Zip", + "Handler": "ServerlessEndpoint::LambdaFunctions.HttpLambda_HttpGetHandler_Generated::HttpGetHandler", + "Events": { + "RootGet": { + "Type": "HttpApi", + "Properties": { + "Path": "/", + "Method": "GET" + } + } + } + } + }, + "LambdaFunctionsSqsLambdaFunctionHandlerGenerated": { + "Type": "AWS::Serverless::Function", + "Metadata": { + "Tool": "Amazon.Lambda.Annotations", + "SyncedEvents": [ + "ServerlessEndpoint" + ], + "SyncedEventProperties": { + "ServerlessEndpoint": [ + "Queue" + ] + } + }, + "Properties": { + "Runtime": "dotnet8", + "CodeUri": ".", + "MemorySize": 512, + "Timeout": 30, + "Policies": [ + "AWSLambdaBasicExecutionRole", + "AmazonSQSFullAccess" + ], + "PackageType": "Zip", + "Handler": "ServerlessEndpoint::LambdaFunctions.SqsLambda_FunctionHandler_Generated::FunctionHandler", + "Events": { + "ServerlessEndpoint": { + "Type": "SQS", + "Properties": { + "Queue": "arn:aws:sqs:region:account-id:ServerlessEndpoint" + } + } + } + } + } + }, + "Outputs": { + "ApiURL": { + "Description": "API endpoint URL of the HttpGet trigger function", + "Value": { + "Fn::Sub": "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/" + } + }, + "ErrorQueueURL": { + "Description": "The URL of the queue", + "Value": { + "Ref": "ErrorQueue" + } + }, + "ServerlessEndpointQueueURL": { + "Description": "The URL of the serverless endpoint queue", + "Value": { + "Ref": "ServerlessEndpointQueue" + } + }, + "RegularEndpointQueueURL": { + "Description": "The URL of the on premise endpoint queue", + "Value": { + "Ref": "RegularEndpointQueue" + } + } + } +} \ No newline at end of file From 52b9fa9439263a0ecb58767a824e708980c0cb9d Mon Sep 17 00:00:00 2001 From: Jason Taylor Date: Wed, 30 Jul 2025 12:59:18 +1000 Subject: [PATCH 2/2] Upgrade to .NET 10 --- .../SQSLambda_4/Messages/Messages.csproj | 7 ++++--- .../SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj | 7 ++++--- .../ServerlessEndpoint/ServerlessEndpoint.csproj | 9 +++++---- .../lambda-sqs-annotations/SQSLambda_4/prerelease.txt | 0 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 samples/aws/lambda-sqs-annotations/SQSLambda_4/prerelease.txt diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj index 2b011d6053c..9c475da724b 100644 --- a/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/Messages/Messages.csproj @@ -1,12 +1,13 @@ - net8.0 - 12.0 + net10.0 + preview + enable - + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj index a019c3829bb..5aaadb6f10a 100644 --- a/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/RegularEndpoint/RegularEndpoint.csproj @@ -1,9 +1,10 @@  - net8.0 + net10.0 Exe - 12.0 + preview + enable @@ -11,7 +12,7 @@ - + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj index 5e372472158..e8a1d334930 100644 --- a/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj +++ b/samples/aws/lambda-sqs-annotations/SQSLambda_4/ServerlessEndpoint/ServerlessEndpoint.csproj @@ -1,10 +1,11 @@ - net8.0 + net10.0 true Lambda - 12.0 + preview + enable @@ -17,8 +18,8 @@ - - + + \ No newline at end of file diff --git a/samples/aws/lambda-sqs-annotations/SQSLambda_4/prerelease.txt b/samples/aws/lambda-sqs-annotations/SQSLambda_4/prerelease.txt new file mode 100644 index 00000000000..e69de29bb2d