Skip to content

Commit

Permalink
fix: increase api CloudFront read timeout (#217)
Browse files Browse the repository at this point in the history
Update the `api` CloudFront origin config to wait for 60 seconds
before responding with a 504 gateway timeout.

This is required because it can take over 30 seconds (default read
timeout) when a new `api` function execution environment is created
and the ClamAV daemon needs to be started.
  • Loading branch information
patheard authored Aug 8, 2022
1 parent 9a5362e commit f09611d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions terragrunt/aws/api/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_cloudfront_distribution" "scan_files_api" {
custom_origin_config {
http_port = 80
https_port = 443
origin_read_timeout = 60
origin_protocol_policy = "https-only"
origin_ssl_protocols = ["TLSv1.2"]
}
Expand Down

0 comments on commit f09611d

Please sign in to comment.