Open
Conversation
d9e8963 to
e6be9e7
Compare
There was a problem hiding this comment.
Pull request overview
Adds configuration knobs for HTTPS listeners in the Lambda Test Tool (Lambda UI emulator and API Gateway emulator), primarily to support Aspire integration scenarios where certificates can be provisioned automatically.
Changes:
- Add
--lambda-emulator-https-portand--api-gateway-emulator-https-portCLI options (and corresponding env var parsing inRunCommand). - Bind the Lambda UI emulator and API Gateway emulator to HTTPS URLs when configured (and prefer HTTPS for the returned/logged
ServiceUrl). - Add an
.autoverpatch changelog entry for the TestTool package.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Processes/TestToolProcess.cs | Adds optional HTTPS URL binding for the Lambda UI emulator and prefers HTTPS for ServiceUrl. |
| Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Processes/ApiGatewayEmulatorProcess.cs | Adds optional HTTP/HTTPS URL binding for API Gateway emulator and prefers HTTPS for logging/ServiceUrl. |
| Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/Settings/RunCommandSettings.cs | Introduces new CLI options and documentation for HTTPS ports. |
| Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/RunCommand.cs | Adds env var constants/parsing and enables starting API Gateway emulator when HTTPS port is provided. |
| .autover/changes/27264eba-d94e-4190-a5ab-91c895db6b45.json | Records changelog message for the patch release. |
Comments suppressed due to low confidence (1)
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/RunCommand.cs:84
- There are existing unit tests for
RunCommand.ExecuteAsync, but none cover the new HTTPS-only API Gateway startup path (e.g.,ApiGatewayEmulatorHttpsPortset withApiGatewayEmulatorPortnull, or configuring viaAPI_GATEWAY_EMULATOR_HTTPS_PORT). Add a test to ensure the command doesn't throw and that the emulator becomes reachable when only the HTTPS port is configured (or at least that settings validation allows this configuration).
if (settings.ApiGatewayEmulatorPort.HasValue || settings.ApiGatewayEmulatorHttpsPort.HasValue)
{
if (settings.ApiGatewayEmulatorMode is null)
{
throw new ArgumentException("When --api-gateway-emulator-port or --api-gateway-emulator-https-port is set the --api-gateway-emulator-mode must be set to configure the mode for the API Gateway emulator.");
}
var apiGatewayEmulatorProcess =
ApiGatewayEmulatorProcess.Startup(settings, cancellationTokenSource.Token);
tasks.Add(apiGatewayEmulatorProcess.RunningTask);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Processes/ApiGatewayEmulatorProcess.cs
Show resolved
Hide resolved
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/Settings/RunCommandSettings.cs
Outdated
Show resolved
Hide resolved
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/Settings/RunCommandSettings.cs
Outdated
Show resolved
Hide resolved
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/Settings/RunCommandSettings.cs
Outdated
Show resolved
Hide resolved
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/Settings/RunCommandSettings.cs
Outdated
Show resolved
Hide resolved
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Commands/RunCommand.cs
Outdated
Show resolved
Hide resolved
e6be9e7 to
03cca33
Compare
GarrettBeatty
approved these changes
Feb 11, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
aws/integrations-on-dotnet-aspire-for-aws#136
Description of changes:
Added the
--lambda-emulator-https-portand--api-gateway-emulator-https-portswitches to configure what HTTPS ports to listen to. Also added corresponding environment variablesLAMBDA_WEB_UI_HTTPS_PORTandAPI_GATEWAY_EMULATOR_HTTPS_PORTthat the Aspire integration will use to configure the ports.To use HTTPS the user has to make sure the environment has certs configured for the host which is usually
localhost. Aspire will automatically take care of setting up certs and set theSSL_CERT_DIRenvironment variable which ASP.NET Core will pick up and automatically use.For the Lambda emulator side the
--lambda-emulator-portstill must always be set because the Lambda Runtime API that Lambda functions call only goes over HTTP. For API Gateway you can set either--api-gateway-emulator-portor--api-gateway-emulator-https-portor both.Testing with HTTPS ports through xunit is tricky and I doubt our CI system will have certs in place so I relied on manually testing building the test tool into NuGet packages and testing it directly along with the Aspire integration.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.