From 7737bd3b27bd677dcc0dc63a1f6aae0249b12f3d Mon Sep 17 00:00:00 2001
From: Malhar Khimsaria <96malhar@gmail.com>
Date: Wed, 19 Jun 2024 12:21:40 -0700
Subject: [PATCH] chore: Update Message Processing Framework VS blueprint
---
.../BlueprintBaseName.1/BlueprintBaseName.1.csproj | 2 +-
.../template/src/BlueprintBaseName.1/Functions.cs | 3 ++-
.../src/BlueprintBaseName.1/serverless.template | 13 +++++++++++--
.../BlueprintDefinitions/vs2022/template.nuspec | 2 +-
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
index 54a47b07b..ed7a16a3e 100644
--- a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
+++ b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/BlueprintBaseName.1.csproj
@@ -11,7 +11,7 @@
true
-
+
diff --git a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/Functions.cs b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/Functions.cs
index c64e67af1..60ef67ea8 100644
--- a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/Functions.cs
+++ b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/Functions.cs
@@ -1,5 +1,5 @@
using Amazon.Lambda.Annotations;
-using Amazon.Lambda.Annotations.APIGateway;
+using Amazon.Lambda.Annotations.SQS;
using Amazon.Lambda.Core;
using Amazon.Lambda.SQSEvents;
using AWS.Messaging;
@@ -56,6 +56,7 @@ public async Task Sender([FromServices] IMessagePublisher publisher, GreetingMes
/// Lambda execution context
/// Set of messages whose handler invocations failed, only these will be reprocessed
[LambdaFunction(Policies = "AWSLambdaSQSQueueExecutionRole")]
+ [SQSEvent("@MessageProcessingFrameworkDemoQueue", ResourceName = "SQSEvent")]
public async Task Handler(SQSEvent evnt, ILambdaContext context)
{
// Pass the SQSEvent into the framework
diff --git a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/serverless.template b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/serverless.template
index 4793bcf50..3499a8afe 100644
--- a/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/serverless.template
+++ b/Blueprints/BlueprintDefinitions/vs2022/MessageProcessingFramework/template/src/BlueprintBaseName.1/serverless.template
@@ -1,7 +1,7 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Transform": "AWS::Serverless-2016-10-31",
- "Description": "AWS Message Processing Framework for .NET Template. This template is partially managed by Amazon.Lambda.Annotations (v1.2.0.0).",
+ "Description": "AWS Message Processing Framework for .NET Template. This template is partially managed by Amazon.Lambda.Annotations (v1.5.0.0).",
"Resources": {
"MessageProcessingFrameworkDemoQueue": {
"Type": "AWS::SQS::Queue"
@@ -9,7 +9,16 @@
"BlueprintBaseName._1FunctionsHandlerGenerated": {
"Type": "AWS::Serverless::Function",
"Metadata": {
- "Tool": "Amazon.Lambda.Annotations"
+ "Tool": "Amazon.Lambda.Annotations",
+ "SyncedEvents": [
+ "SQSEvent"
+ ],
+ "SyncedEventProperties": {
+ "SQSEvent": [
+ "Queue.Fn::GetAtt",
+ "FunctionResponseTypes"
+ ]
+ }
},
"Properties": {
"Runtime": "dotnet8",
diff --git a/Blueprints/BlueprintDefinitions/vs2022/template.nuspec b/Blueprints/BlueprintDefinitions/vs2022/template.nuspec
index 46cbdfd47..0ccde4e2a 100644
--- a/Blueprints/BlueprintDefinitions/vs2022/template.nuspec
+++ b/Blueprints/BlueprintDefinitions/vs2022/template.nuspec
@@ -2,7 +2,7 @@
Amazon.Lambda.Templates
- 7.1.1
+ 7.2.0
Amazon Web Services
AWS Amazon Lambda
AWS Lambda templates for Microsoft Template Engine accessible with the dotnet CLI's new command