-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(cloudfront-origins): response completion timeout #35485
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
Conversation
const responseCompletionSec = responseCompletionTimeout.toSeconds(); | ||
const readTimeoutSec = readTimeout.toSeconds(); | ||
|
||
if (responseCompletionSec < readTimeoutSec) { |
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.
It is probably very unlikely, but possible, that either responseCompletionTimeout
and/or readTimeout
is a Token, so this validation should consider that edge case. Feel free to use either !Token.isResolved()
or withResolved()
approach to run or skip the validation.
withResolved(responseCompletionTimeout, readTimeout, () => {
// Validation
});
OR
if (!Token.isUnresolved(responseCompletionTimeout) && !Token.isUnresolved(readTimeout)) {
// Validation
}
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.
You are absolutely right!! Thanks.
@badmintoncryer added one comment, other than that, the PR looks good to me. Will be approved once the changes are done. |
Pull request has been modified.
@alvazjor Thank you for your review!! I've updated my implementation. |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
None
Reason for this change
AWS Cloudfront supports for configuring response completion timeout.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistValuesOrigin.html#response-completion-timeout
Description of changes
Core Implementation
responseCompletionTimeout
: Duration to OriginOptions interfacebind()
method to include property in CloudFormation outputOrigin Classes
HttpOrigin
&FunctionUrlOrigin
: Added validation to ensureresponseCompletionTimeout
>=readTimeout
RestApiOrigin
&LoadBalancerV2Origin
: Inherit validation throughHttpOrigin
Describe any new or updated permissions being added
None
Description of how you validated changes
Add both unit and integ tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license