feat(cloudfront-origins): response completion timeout#35485
feat(cloudfront-origins): response completion timeout#35485mergify[bot] merged 21 commits intoaws:mainfrom
Conversation
| const responseCompletionSec = responseCompletionTimeout.toSeconds(); | ||
| const readTimeoutSec = readTimeout.toSeconds(); | ||
|
|
||
| if (responseCompletionSec < readTimeoutSec) { |
There was a problem hiding this comment.
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.
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>=readTimeoutRestApiOrigin&LoadBalancerV2Origin: Inherit validation throughHttpOriginDescribe 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