[Bug Fix] Allow specifying lambda layer account id to avoid deployment failure when version is specified - #55
Open
VardyNg wants to merge 2 commits into
Open
Conversation
- Add lambdaInsightsAccount configuration option to allow custom AWS account IDs - Define defaultLambdaInsightsAccount constant for standard AWS-managed layer - Update generateLayerARN to accept and use custom account parameter - Add checkLambdaInsightsAccount validation method for account ID type checking - Pass layerAccount through addLambdaInsightsToFunctions call chain - Extract and validate lambdaInsightsAccount from plugin configuration - Update test helper createServerless to support custom account parameter - Add test case for custom account with explicit version - Add test case validating account parameter type validation - Improve ARN matching in tests using regex pattern for account flexibility - Fix formatting inconsistencies and whitespace issues in tests
- Add `lambdaInsightsAccount` parameter to custom configuration example - Include note explaining when `lambdaInsightsAccount` takes effect - Document that setting only applies when `lambdaInsightsVersion` is explicitly set - Reference AWS documentation for per-region account IDs - Clarify that bundled mappings are used when no explicit version is specified
Author
|
Setting it as a draft for now, working on testing by deploying with the latest serverless framework |
Author
|
Tested and it is working as expected, I have put the test in here: https://github.com/VardyNg/serverless-lambda-insight-test Please refer to the README for the test plan and result https://github.com/VardyNg/serverless-lambda-insight-test/blob/6bf6daf88a0d5624e4d75a97f4732ce78d699a0e/README.md?plain=1#L12-L141 |
VardyNg
marked this pull request as ready for review
July 7, 2026 19:40
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: #54
Description of changes:
lambdaInsightsAccountparameterlambdaInsightsAccountto override the default account id, if provided.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.