chore: Make helpers take one, not multiple Lambda functions (2/x) #323
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.
Context of this PR series
The end goal of this series of PRs is to abort the instrumentation of a Lambda function if its runtime is not supported, while still instrument other Lambda functions. More in #314
However, this behavior is hard to implement under the current code structure:
If one of the steps skips a Lambda function, it's hard for the subsequent steps to know this and thus skip the Lambda function.
Therefore, at the end of day, I'm going to change the code structure to:
to make it possible to implement this behavior.
What does this PR do?
This PR makes these helper functions to take a single Lambda function instead of multiple ones:
applyLayers()
It's not supposed to change code behavior.
I'll handle other helper functions in separate PRs, to keep each PR small and easy to review.
Testing Guidelines
Run snapshot tests:
aws-vault exec sso-serverless-sandbox-account-admin -- scripts/run_integration_tests.sh
to ensure the generated CloudFormation template for the test stacks are not changed.Additional Notes
Types of Changes
Check all that apply