Repository navigation
Conversation
Lambda functions without CapacityProviderConfig have a maximum Timeout of 900 seconds. Functions using Lambda Managed Instances (via CapacityProviderConfig) can specify a Timeout up to 5400 seconds. The resource schema only enforces the flat 5400-second maximum, so this rule adds the conditional 900-second maximum for functions that do not use a capacity provider.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4685 +/- ##
=======================================
Coverage 94.64% 94.65%
=======================================
Files 433 434 +1
Lines 15512 15528 +16
Branches 3011 3011
=======================================
+ Hits 14682 14698 +16
Misses 453 453
Partials 377 377
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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: N/A
Description of changes:
Adds rule E3717 to validate the
Timeoutproperty ofAWS::Lambda::Functionbased on whether the function uses a capacity provider (Lambda Managed Instances).The maximum
Timeoutof 900 seconds only applies to functions withoutCapacityProviderConfig. Functions using Lambda Managed Instances (viaCapacityProviderConfig) can specify aTimeoutup to 5400 seconds. The resource schema only enforces the flat 5400-second maximum, so this rule adds the conditional 900-second maximum for functions that do not use a capacity provider.Behavior:
TimeoutCapacityProviderConfig900CapacityProviderConfig> 900CapacityProviderConfigpresent<= 5400CapacityProviderConfigpresent> 5400Implementation follows the existing conditional-maximum pattern (e.g.
E3718for API GatewayAuthorizerResultTtlInSeconds): a smallif/thenschema extension plus a rule class. This behavior was verified against the live LambdaCreateFunctionAPI.Includes unit tests and a
docs/rules.mdentry.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.