File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ pub mod lambda_private {
99 use aws_sdk_lambda:: types:: InvocationType ;
1010 use aws_credential_types:: Credentials ;
1111 use aws_types:: region:: Region ;
12+ use aws_sdk_lambda:: config:: retry:: RetryConfig ;
1213 use bytes:: Bytes ;
1314 use std:: error:: Error ;
1415 use std:: sync:: Arc ;
@@ -127,7 +128,13 @@ pub mod lambda_private {
127128 . await
128129 } ;
129130
130- let mut lambda_config = LambdaConfigBuilder :: from ( & sdk_config) ;
131+ // Disable SDK retries - let Varnish handle retry logic at a higher level.
132+ // This prevents worker threads from being blocked during exponential backoff
133+ // and ensures metrics (inflight, throttled, fail) are accurate.
134+ let retry_config = RetryConfig :: standard ( ) . with_max_attempts ( 1 ) ;
135+
136+ let mut lambda_config = LambdaConfigBuilder :: from ( & sdk_config)
137+ . retry_config ( retry_config) ;
131138 if let Some ( url) = endpoint_url {
132139 lambda_config = lambda_config. endpoint_url ( url) ;
133140 }
You can’t perform that action at this time.
0 commit comments