Fix: Use Lambda URL to bypass Gateway timeout limit #384
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.
Summary
Fixed AWS API Gateway timeout limit for AWS Lambda deployment, by replacing API Gateway with Lambda function URL to generate invocation URL
Problem: Previous deployment with API Gateway (with differing page paths for each Lambda function) can only handle invocations within 29 seconds due to gateway timeout. However, actual traces involve invocations longer than 29s. Although our current code filters for invocations under 1 minute, it is not sufficient to address the problem.
**Included minor fixes to improve the logging description of errors.
Implementation Notes ⚒️
Solution: Utilise AWS' Lambda function URL feature to increase the maximum invocation duration to 15 minutes (same as Lambda execution timeout limit).
Therefore, program can now handle any
requestedDuration
within 15 minutes and the resulting function URLs no longer share the same domain name (unlike previous approach where different Lambda functions share the same domain name due to usage of an API Gateway and only differ for the page path)External Dependencies 🍀
Breaking API Changes⚠️