From ad0ebab0a1f01fa69c99d65081406da06cc68571 Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Tue, 16 Dec 2025 18:14:46 +0000 Subject: [PATCH 1/8] update permissions (#2231) (#2232) --- .github/workflows/closed-issue-message.yml | 4 ++++ .github/workflows/stale_issues.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/closed-issue-message.yml b/.github/workflows/closed-issue-message.yml index bceb11297..3c394caaa 100644 --- a/.github/workflows/closed-issue-message.yml +++ b/.github/workflows/closed-issue-message.yml @@ -2,6 +2,10 @@ name: Closed Issue Message on: issues: types: [closed] + +permissions: + issues: write + jobs: auto_comment: runs-on: ubuntu-latest diff --git a/.github/workflows/stale_issues.yml b/.github/workflows/stale_issues.yml index c81dd92b0..2eb129c00 100644 --- a/.github/workflows/stale_issues.yml +++ b/.github/workflows/stale_issues.yml @@ -5,6 +5,10 @@ on: schedule: - cron: "0 0 * * *" +permissions: + issues: write + pull-requests: write + jobs: cleanup: runs-on: ubuntu-latest From 0548eb33b4f2776baedd743054f538582f5addec Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Fri, 9 Jan 2026 12:48:34 -0500 Subject: [PATCH 2/8] Dev (#2248) * doc: update readme to point at changelog correctly (#2243) * Bump tj-actions/changed-files from 47.0.0 to 47.0.1 (#2239) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 47.0.0 to 47.0.1. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/24d32ffd492484c1d75e0c0b894501ddb9d30d62...e0021407031f5be11a464abee9a0776171c79891) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-version: 47.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump aws-actions/configure-aws-credentials from 5.0.0 to 5.1.1 (#2238) Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 5.0.0 to 5.1.1. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/a03048d87541d1d9fcf2ecf528a4a65ba9bd7838...61815dcd50bd041e203e49132bacad1fd04d2708) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-version: 5.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add grouping for GitHub Actions updates (#2247) Group all GitHub Actions updates into a single PR. --------- Signed-off-by: dependabot[bot] Co-authored-by: Samuel Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/dependabot.yml | 8 ++++++-- .github/workflows/aws-ci.yml | 6 +++--- .github/workflows/change-file-in-pr.yml | 2 +- .github/workflows/create-release-pr.yml | 2 +- .github/workflows/sync-master-dev.yml | 2 +- README.md | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8190c861c..5141e8016 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,3 @@ -# Set update schedule for GitHub Actions - version: 2 updates: @@ -11,3 +9,9 @@ updates: labels: - "Release Not Needed" target-branch: "dev" + # Group all github-actions updates into a single PR + groups: + all-github-actions: + applies-to: "version-updates" + patterns: + - "*" diff --git a/.github/workflows/aws-ci.yml b/.github/workflows/aws-ci.yml index fddddbd66..582ce5eed 100644 --- a/.github/workflows/aws-ci.yml +++ b/.github/workflows/aws-ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Configure Load Balancer Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v4 + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v4 with: role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }} role-duration-seconds: 7200 @@ -29,7 +29,7 @@ jobs: $roleArn=$(cat ./response.json) "roleArn=$($roleArn -replace '"', '')" >> $env:GITHUB_OUTPUT - name: Configure Test Runner Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v4 + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v4 with: role-to-assume: ${{ steps.lambda.outputs.roleArn }} role-duration-seconds: 7200 @@ -41,7 +41,7 @@ jobs: project-name: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }} - name: Configure Test Sweeper Lambda Credentials if: always() - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v4 + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v4 with: role-to-assume: ${{ steps.lambda.outputs.roleArn }} role-duration-seconds: 7200 diff --git a/.github/workflows/change-file-in-pr.yml b/.github/workflows/change-file-in-pr.yml index 944b3bc94..24c9477bd 100644 --- a/.github/workflows/change-file-in-pr.yml +++ b/.github/workflows/change-file-in-pr.yml @@ -16,7 +16,7 @@ jobs: - name: Get List of Changed Files id: changed-files - uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 #v45 + uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 #v45 - name: Check for Change File(s) in .autover/changes/ run: | diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 952a75d14..27a6ed751 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -25,7 +25,7 @@ jobs: steps: # Assume an AWS Role that provides access to the Access Token - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0 + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 with: role-to-assume: ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_ROLE_ARN }} aws-region: us-west-2 diff --git a/.github/workflows/sync-master-dev.yml b/.github/workflows/sync-master-dev.yml index 356fde29c..1eec374f3 100644 --- a/.github/workflows/sync-master-dev.yml +++ b/.github/workflows/sync-master-dev.yml @@ -26,7 +26,7 @@ jobs: steps: # Assume an AWS Role that provides access to the Access Token - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0 + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1 with: role-to-assume: ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_ROLE_ARN }} aws-region: us-west-2 diff --git a/README.md b/README.md index 37871d167..405e952a5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Repository for the AWS NuGet packages and Blueprints to support writing AWS Lambda functions using .NET Core. -For a history of releases view the [release change log](RELEASE.CHANGELOG.md) +For a history of releases view the [release change log](CHANGELOG.md) ## Table of Contents - [AWS Lambda for .NET Core ![Gitter](https://gitter.im/aws/aws-lambda-dotnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)](#aws-lambda-for-net-core-img-srchttpsbadgesgitterimjoin20chatsvg-altgitter) From c0c58242cde085a55605e527d85ae6c007e3130e Mon Sep 17 00:00:00 2001 From: Jonathan Nunn Date: Wed, 10 Dec 2025 18:33:06 +0000 Subject: [PATCH 3/8] Fix #2208: Add handler configuration documentation - Add Handler Configuration section to AspNetCoreServer.Hosting README - Document executable vs class library handler modes - Explain Main(string[] args) pitfall causing JsonSerializerException - Provide clear code examples for correct handler setup - Address community confusion about Lambda handler configuration --- .../README.md | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md index 68d287fa5..8cbc58315 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md @@ -1,4 +1,3 @@ - # Amazon.Lambda.AspNetCoreServer.Hosting This package allows ASP .NET Core applications written using the minimal api style to be deployed @@ -50,6 +49,40 @@ app.Run(); ``` +## Handler Configuration + +When deploying your Lambda function, the handler configuration depends on your project structure. + +### Executable Mode (Recommended) + +For executable mode, use `AssemblyName` as the handler (e.g., `MyLambdaProject`). This mode works with top-level statements or a `Main()` method without parameters. The Lambda runtime client handles event routing automatically. + +### Class Library Mode + +For class library mode, use `AssemblyName::ClassName::MethodName` as the handler. This mode works with traditional class-based handlers and uses reflection-based method invocation. + +### Common Configuration Issue + +When using `Main(string[] args)` with executable mode handler configuration, the Lambda runtime attempts to deserialize the incoming API Gateway event JSON into the `string[] args` parameter, which causes a `JsonSerializerException`. + +Incorrect usage: +```csharp +static void Main(string[] args) +{ + var builder = WebApplication.CreateBuilder(args); + // ... rest of setup +} +``` + +Correct usage for executable mode: +```csharp +static void Main() +{ + var builder = WebApplication.CreateBuilder(); + // ... rest of setup +} +``` + ## Extension Points `AddAWSLambdaHosting` accepts an optional `HostingOptions` configuration action that exposes the same customization hooks available in the traditional `AbstractAspNetCoreFunction` base class approach. @@ -110,5 +143,4 @@ builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi, options => apiResponse.Headers ??= new Dictionary(); apiResponse.Headers["X-Request-Id"] = context.AwsRequestId; }; -}); -``` \ No newline at end of file +}); \ No newline at end of file From f5050fc8ab382a4092854c705467d6dc8e6255f6 Mon Sep 17 00:00:00 2001 From: Jonathan Nunn Date: Fri, 12 Dec 2025 18:29:05 +0000 Subject: [PATCH 4/8] Added change file --- .../issue-2208-handler-configuration-docs.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .autover/changes/issue-2208-handler-configuration-docs.json diff --git a/.autover/changes/issue-2208-handler-configuration-docs.json b/.autover/changes/issue-2208-handler-configuration-docs.json new file mode 100644 index 000000000..2bbb78968 --- /dev/null +++ b/.autover/changes/issue-2208-handler-configuration-docs.json @@ -0,0 +1,11 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.AspNetCoreServer.Hosting", + "Type": "Patch", + "ChangelogMessages": [ + "Added Handler Configuration documentation explaining executable vs class library modes and Main(string[] args) pitfall" + ] + } + ] +} \ No newline at end of file From 1096440b6c05707aa2d7cf30929f17e4910c061d Mon Sep 17 00:00:00 2001 From: Jonathan Nunn Date: Thu, 15 Jan 2026 17:26:43 +0000 Subject: [PATCH 5/8] Applied code review feedback --- .../src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md index 8cbc58315..c06a53ff9 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md @@ -60,6 +60,7 @@ For executable mode, use `AssemblyName` as the handler (e.g., `MyLambdaProject`) ### Class Library Mode For class library mode, use `AssemblyName::ClassName::MethodName` as the handler. This mode works with traditional class-based handlers and uses reflection-based method invocation. +<<<<<<< HEAD ### Common Configuration Issue @@ -143,4 +144,6 @@ builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi, options => apiResponse.Headers ??= new Dictionary(); apiResponse.Headers["X-Request-Id"] = context.AwsRequestId; }; -}); \ No newline at end of file +}); +======= +>>>>>>> 76224107 (Applied code review feedback) From 0f70aa006fe1b511be9c0d245ed0927134f21c74 Mon Sep 17 00:00:00 2001 From: Jonathan Nunn Date: Thu, 15 Jan 2026 17:44:40 +0000 Subject: [PATCH 6/8] Applied code review feedback. --- .../README.md | 37 +------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md index c06a53ff9..b3c2688f3 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md @@ -51,38 +51,7 @@ app.Run(); ## Handler Configuration -When deploying your Lambda function, the handler configuration depends on your project structure. - -### Executable Mode (Recommended) - -For executable mode, use `AssemblyName` as the handler (e.g., `MyLambdaProject`). This mode works with top-level statements or a `Main()` method without parameters. The Lambda runtime client handles event routing automatically. - -### Class Library Mode - -For class library mode, use `AssemblyName::ClassName::MethodName` as the handler. This mode works with traditional class-based handlers and uses reflection-based method invocation. -<<<<<<< HEAD - -### Common Configuration Issue - -When using `Main(string[] args)` with executable mode handler configuration, the Lambda runtime attempts to deserialize the incoming API Gateway event JSON into the `string[] args` parameter, which causes a `JsonSerializerException`. - -Incorrect usage: -```csharp -static void Main(string[] args) -{ - var builder = WebApplication.CreateBuilder(args); - // ... rest of setup -} -``` - -Correct usage for executable mode: -```csharp -static void Main() -{ - var builder = WebApplication.CreateBuilder(); - // ... rest of setup -} -``` +The Lambda function handler must be set to the assembly name (e.g., `MyLambdaProject`). The `AddAWSLambdaHosting` method sets up the Lambda runtime client and registers the callback for processing Lambda events, so the handler should not use the class library format (`::::`). ## Extension Points @@ -144,6 +113,4 @@ builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi, options => apiResponse.Headers ??= new Dictionary(); apiResponse.Headers["X-Request-Id"] = context.AwsRequestId; }; -}); -======= ->>>>>>> 76224107 (Applied code review feedback) +}); \ No newline at end of file From a78cabb17e46c3bf5f9c0ed856bc8edfadf2bf21 Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Sun, 1 Feb 2026 14:23:25 -0500 Subject: [PATCH 7/8] Delete .autover/changes/issue-2208-handler-configuration-docs.json --- .../issue-2208-handler-configuration-docs.json | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .autover/changes/issue-2208-handler-configuration-docs.json diff --git a/.autover/changes/issue-2208-handler-configuration-docs.json b/.autover/changes/issue-2208-handler-configuration-docs.json deleted file mode 100644 index 2bbb78968..000000000 --- a/.autover/changes/issue-2208-handler-configuration-docs.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Projects": [ - { - "Name": "Amazon.Lambda.AspNetCoreServer.Hosting", - "Type": "Patch", - "ChangelogMessages": [ - "Added Handler Configuration documentation explaining executable vs class library modes and Main(string[] args) pitfall" - ] - } - ] -} \ No newline at end of file From c8306b88d8a62dd26fe1774e070751ebac6cae45 Mon Sep 17 00:00:00 2001 From: Jonathan Nunn Date: Wed, 4 Mar 2026 23:49:21 +0000 Subject: [PATCH 8/8] Fix: Add missing closing backticks to code block --- .../src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md index b3c2688f3..0098747bf 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/README.md @@ -1,3 +1,4 @@ + # Amazon.Lambda.AspNetCoreServer.Hosting This package allows ASP .NET Core applications written using the minimal api style to be deployed @@ -113,4 +114,5 @@ builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi, options => apiResponse.Headers ??= new Dictionary(); apiResponse.Headers["X-Request-Id"] = context.AwsRequestId; }; -}); \ No newline at end of file +}); +``` \ No newline at end of file