feat(sam-app): add parameter to optionally override the sfInvokeApi Lambda Timeout #66
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:
None
Description of changes:
Problem statement
When deploying this SAM stack in order to connect Amazon Connect with Salesforce, we often found that the
sfInvokeAPILambda was resulting in timeouts - not by much, yet frequently enough for it to be an issue.Given its timeout defaults to the one define as a Global for all the Lambda functions (that wouldn't have it overridden) in the stack, it means we were unable to specifically increase this one.
As of now, we have the following hack as a pre-hook in our tool (Spacelift) that handles this stack's deployment:
We'd very much favor just defining a parameter through an environment variable, just like we do for the rest of the parameters.
Proposed solution
This PR introduced a
SfInvokeApiTimeoutoptional parameter that is used for thesfInvokeAPILambda if found - and otherwise default to the Global. That means that it doesn't change anything for existing users, and allows the ones who need to increase it to do so specifically.Happy to discuss the proposed change or learn about another option we might have missed!
Note: I'm also sharing this PR with our AWS TAM and SA along the way
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.