From ff749d683e56aa8ac7bee362ca2fed3d69eb2c0d Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Wed, 18 Feb 2026 14:57:48 -0800 Subject: [PATCH] Update AWSLambdaPSCore to target .NET 10 managed runtime --- CHANGELOG.md | 5 +++++ PowerShell/Module/AWSLambdaPSCore.psd1 | 2 +- PowerShell/Module/Private/_Constants.ps1 | 6 +++--- .../Module/Templates/Blueprints/Basic/basic.ps1.txt | 2 +- .../cloudformationcustomresource.ps1.txt | 2 +- .../CodeCommitTrigger/codecommittrigger.ps1.txt | 2 +- .../Blueprints/DetectLabels/detectlabels.ps1.txt | 6 +++--- .../kinesisstreamprocessor.ps1.txt | 2 +- .../Templates/Blueprints/S3Event/s3event.ps1.txt | 4 ++-- .../Blueprints/S3EventToSNS/s3tosns.ps1.txt | 4 ++-- .../S3EventToSNSToSQS/s3tosnstosqs.ps1.txt | 4 ++-- .../Blueprints/S3EventToSQS/s3tosqs.ps1.txt | 4 ++-- .../SNSSubscription/snssubscription.ps1.txt | 2 +- .../Templates/Blueprints/SNSToSQS/snstosqs.ps1.txt | 2 +- .../SQSQueueProcessor/sqsprocessor.ps1.txt | 2 +- .../Templates/Blueprints/projectfile.csproj.txt | 6 +++--- PowerShell/README.md | 12 ++++++------ 17 files changed, 36 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e00b0ca4..1679aece5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## Release 2026-02-18 + +### AWSLambdaPSCore PowerShell Module (5.0.0) +* Updated to target the .NET 10 Lambda runtime + ## Release 2026-02-10 ### Amazon.Lambda.Annotations (1.9.0) diff --git a/PowerShell/Module/AWSLambdaPSCore.psd1 b/PowerShell/Module/AWSLambdaPSCore.psd1 index 0088e105a..64d14463e 100644 --- a/PowerShell/Module/AWSLambdaPSCore.psd1 +++ b/PowerShell/Module/AWSLambdaPSCore.psd1 @@ -12,7 +12,7 @@ RootModule = 'AWSLambdaPSCore.psm1' # Version number of this module. -ModuleVersion = '4.0.4.0' +ModuleVersion = '5.0.0.0' # Supported PSEditions CompatiblePSEditions = 'Core' diff --git a/PowerShell/Module/Private/_Constants.ps1 b/PowerShell/Module/Private/_Constants.ps1 index f306afac9..a97e1e383 100644 --- a/PowerShell/Module/Private/_Constants.ps1 +++ b/PowerShell/Module/Private/_Constants.ps1 @@ -20,15 +20,15 @@ if (!($AwsPowerShellFunctionEnvName)) if (!($AwsPowerShellDefaultSdkVersion)) { - New-Variable -Name AwsPowerShellDefaultSdkVersion -Value '7.4.5' -Option Constant + New-Variable -Name AwsPowerShellDefaultSdkVersion -Value '7.5.4' -Option Constant } if (!($AwsPowerShellTargetFramework)) { - New-Variable -Name AwsPowerShellTargetFramework -Value 'net8.0' -Option Constant + New-Variable -Name AwsPowerShellTargetFramework -Value 'net10.0' -Option Constant } if (!($AwsPowerShellLambdaRuntime)) { - New-Variable -Name AwsPowerShellLambdaRuntime -Value 'dotnet8' -Option Constant + New-Variable -Name AwsPowerShellLambdaRuntime -Value 'dotnet10' -Option Constant } \ No newline at end of file diff --git a/PowerShell/Module/Templates/Blueprints/Basic/basic.ps1.txt b/PowerShell/Module/Templates/Blueprints/Basic/basic.ps1.txt index 20999c013..6d1bd4f07 100644 --- a/PowerShell/Module/Templates/Blueprints/Basic/basic.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/Basic/basic.ps1.txt @@ -9,7 +9,7 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) \ No newline at end of file diff --git a/PowerShell/Module/Templates/Blueprints/CloudFormationCustomResource/cloudformationcustomresource.ps1.txt b/PowerShell/Module/Templates/Blueprints/CloudFormationCustomResource/cloudformationcustomresource.ps1.txt index 8515438b5..05b53f22e 100644 --- a/PowerShell/Module/Templates/Blueprints/CloudFormationCustomResource/cloudformationcustomresource.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/CloudFormationCustomResource/cloudformationcustomresource.ps1.txt @@ -9,7 +9,7 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/CodeCommitTrigger/codecommittrigger.ps1.txt b/PowerShell/Module/Templates/Blueprints/CodeCommitTrigger/codecommittrigger.ps1.txt index 8cdd6bfb2..389556b48 100644 --- a/PowerShell/Module/Templates/Blueprints/CodeCommitTrigger/codecommittrigger.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/CodeCommitTrigger/codecommittrigger.ps1.txt @@ -9,7 +9,7 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/DetectLabels/detectlabels.ps1.txt b/PowerShell/Module/Templates/Blueprints/DetectLabels/detectlabels.ps1.txt index 007713077..746caf8dc 100644 --- a/PowerShell/Module/Templates/Blueprints/DetectLabels/detectlabels.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/DetectLabels/detectlabels.ps1.txt @@ -9,9 +9,9 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.Rekognition';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.Rekognition';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/KinesisStreamProcessor/kinesisstreamprocessor.ps1.txt b/PowerShell/Module/Templates/Blueprints/KinesisStreamProcessor/kinesisstreamprocessor.ps1.txt index 1859e69fd..f011c9bd0 100644 --- a/PowerShell/Module/Templates/Blueprints/KinesisStreamProcessor/kinesisstreamprocessor.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/KinesisStreamProcessor/kinesisstreamprocessor.ps1.txt @@ -9,7 +9,7 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/S3Event/s3event.ps1.txt b/PowerShell/Module/Templates/Blueprints/S3Event/s3event.ps1.txt index 270a6853a..6937311c0 100644 --- a/PowerShell/Module/Templates/Blueprints/S3Event/s3event.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/S3Event/s3event.ps1.txt @@ -12,8 +12,8 @@ # The following link contains documentation describing the structure of the S3 event object. # https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/S3EventToSNS/s3tosns.ps1.txt b/PowerShell/Module/Templates/Blueprints/S3EventToSNS/s3tosns.ps1.txt index a3d2b9cbb..1927e3662 100644 --- a/PowerShell/Module/Templates/Blueprints/S3EventToSNS/s3tosns.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/S3EventToSNS/s3tosns.ps1.txt @@ -15,8 +15,8 @@ # This example demonstrates how to process an S3 Event that follows the process: # S3 Event -> SNS Topic -> Lambda Function -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/S3EventToSNSToSQS/s3tosnstosqs.ps1.txt b/PowerShell/Module/Templates/Blueprints/S3EventToSNSToSQS/s3tosnstosqs.ps1.txt index 431ee584f..6dcb5c24b 100644 --- a/PowerShell/Module/Templates/Blueprints/S3EventToSNSToSQS/s3tosnstosqs.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/S3EventToSNSToSQS/s3tosnstosqs.ps1.txt @@ -15,8 +15,8 @@ # This example demonstrates how to process an S3 Event that follows the process: # S3 Event -> SNS Topic -> SQS Queue -> Lambda Function -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs #Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/S3EventToSQS/s3tosqs.ps1.txt b/PowerShell/Module/Templates/Blueprints/S3EventToSQS/s3tosqs.ps1.txt index 39be590fd..a5981efbc 100644 --- a/PowerShell/Module/Templates/Blueprints/S3EventToSQS/s3tosqs.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/S3EventToSQS/s3tosqs.ps1.txt @@ -15,8 +15,8 @@ # This example demonstrates how to process an S3 Event that follows the process: # S3 Event -> SQS Queue -> Lambda Function -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} -#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} +#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/SNSSubscription/snssubscription.ps1.txt b/PowerShell/Module/Templates/Blueprints/SNSSubscription/snssubscription.ps1.txt index b5ee1d351..3c0785abc 100644 --- a/PowerShell/Module/Templates/Blueprints/SNSSubscription/snssubscription.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/SNSSubscription/snssubscription.ps1.txt @@ -9,7 +9,7 @@ # To include PowerShell modules with your Lambda function, like the AWS.Tools.S3 module, add a "#Requires" statement # indicating the module and version. If using an AWS.Tools.* module the AWS.Tools.Common module is also required. -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/SNSToSQS/snstosqs.ps1.txt b/PowerShell/Module/Templates/Blueprints/SNSToSQS/snstosqs.ps1.txt index e5947ceaa..40635e752 100644 --- a/PowerShell/Module/Templates/Blueprints/SNSToSQS/snstosqs.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/SNSToSQS/snstosqs.ps1.txt @@ -12,7 +12,7 @@ # This example demonstrates how to process an SNS Message that follows the process: # SNS topic -> SQS Queue -> Lambda Function -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/SQSQueueProcessor/sqsprocessor.ps1.txt b/PowerShell/Module/Templates/Blueprints/SQSQueueProcessor/sqsprocessor.ps1.txt index d6fa7983e..e12e689d2 100644 --- a/PowerShell/Module/Templates/Blueprints/SQSQueueProcessor/sqsprocessor.ps1.txt +++ b/PowerShell/Module/Templates/Blueprints/SQSQueueProcessor/sqsprocessor.ps1.txt @@ -12,7 +12,7 @@ # This example demonstrates how to process an SQS Queue: # SQS Queue -> Lambda Function -#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='4.1.518'} +#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='5.0.158'} # Uncomment to send the input event to CloudWatch Logs # Write-Host (ConvertTo-Json -InputObject $LambdaInput -Compress -Depth 5) diff --git a/PowerShell/Module/Templates/Blueprints/projectfile.csproj.txt b/PowerShell/Module/Templates/Blueprints/projectfile.csproj.txt index 394a7e34f..11b68f1aa 100644 --- a/PowerShell/Module/Templates/Blueprints/projectfile.csproj.txt +++ b/PowerShell/Module/Templates/Blueprints/projectfile.csproj.txt @@ -1,6 +1,6 @@ - net8.0 + net10.0 true @@ -16,7 +16,7 @@ - - + + \ No newline at end of file diff --git a/PowerShell/README.md b/PowerShell/README.md index 63df61070..9186b5484 100644 --- a/PowerShell/README.md +++ b/PowerShell/README.md @@ -17,11 +17,11 @@ If you are using Visual Studio Code on Windows as your IDE, you need to ensure i configured for PowerShell Core. To learn how to configure Visual Studio Code for PowerShell Core, see the following: https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/using-vscode?view=powershell-7.4 -Next, we need to install the .NET 8 SDK. Because PowerShell Core is built on top of -.NET Core, the Lambda support for PowerShell uses the same .NET 8 Lambda runtime for -both .NET Core and PowerShell based Lambda functions. The .NET 8 SDK is used by +Next, we need to install the .NET 10 SDK. Because PowerShell Core is built on top of +.NET Core, the Lambda support for PowerShell uses the same .NET 10 Lambda runtime for +both .NET Core and PowerShell based Lambda functions. The .NET 10 SDK is used by the new PowerShell publishing cmdlets for Lambda to create the Lambda deployment -package. You can find the .NET 8 SDK [here]( https://www.microsoft.com/net/download). Be +package. You can find the .NET 10 SDK [here]( https://www.microsoft.com/net/download). Be sure to install the SDK, not the runtime installation. The last component we need for the development environment is the @@ -43,9 +43,9 @@ New-AWSPowerShellLambdaPackage|Creates the Lambda deployment package that can be ## Troubleshooting ### Enabling Debug output -In PowerShell, [Write-Debug](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-debug?view=powershell-7.4) CmdLet could be used to write debug message to the console. However, by default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the **$DebugPreference** variable. +In PowerShell, [Write-Debug](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-debug) CmdLet could be used to write debug message to the console. However, by default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the **$DebugPreference** variable. -The default value of [DebugPreference](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-7.4#debugpreference) variable is `SilentlyContinue`, which means the debug message isn't displayed and execution continues without interruption. The `-Debug` parameter could be used to override the `$DebugPreference` value. +The default value of [DebugPreference](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables#debugpreference) variable is `SilentlyContinue`, which means the debug message isn't displayed and execution continues without interruption. The `-Debug` parameter could be used to override the `$DebugPreference` value. Enabling output of `Write-Debug` to CloudWatch logs is a 2 step process: - In PowerShell Lambda script,