-
Notifications
You must be signed in to change notification settings - Fork 974
added pattern - cloudfront-keyvaluestore-apigw-routing-cdk #2731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
In a real-world scenario: | ||
|
||
* The available targets would be maintained in the Key Value Store | ||
* More complex routing logic would be implemented in the CloudFront function (e.g., routing based on user attributes, geographic location, A/B testing scenarios) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that be a use-case for Lambda@Edge as CloudFront functions have a limit of 5ms and you cannot perform network access to fetch additional data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry my fault and will update.
cloudfront-keyvaluestore-apigw-routing-cdk/example-pattern.json
Outdated
Show resolved
Hide resolved
cloudfront-keyvaluestore-apigw-routing-cdk/example-pattern.json
Outdated
Show resolved
Hide resolved
"jest": "^29.7.0", | ||
"ts-jest": "^29.2.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed as there are no tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
Co-authored-by: Ben <[email protected]>
Co-authored-by: Ben <[email protected]>
Co-authored-by: Ben <[email protected]>
Looks good, thanks for your contribution. Your pattern will be merged to Serverlessland.com soon |
Issue #, if available:
#2732
Description of changes:
This pattern demonstrates how to use Amazon CloudFront with CloudFront Functions to dynamically route traffic between multiple Amazon API Gateway endpoints. The routing decisions are based on values stored in CloudFront Key Value Store, allowing for flexible, configuration-driven request routing without redeploying your infrastructure.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.