You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Prowler requires specifying the provider (e.g. `aws`, `gcp`, `azure`, `kubernetes`, `m365`, `github`, `iac` or `mongodbatlas`):
@@ -91,6 +93,18 @@ By default, `prowler` will scan all AWS regions.
91
93
</Note>
92
94
See more details about AWS Authentication in the [Authentication Section](/user-guide/providers/aws/authentication) section.
93
95
96
+
-**AWS Retrier and Timeout Configuration**
97
+
98
+
<VersionBadgeversion="5.42.0" />
99
+
100
+
Tune the Boto3 standard retrier and the endpoint timeouts when AWS throttles the scan or when some endpoints are unreachable from the network Prowler runs in:
Prowler's AWS Provider leverages Boto3's [Standard](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html) retry mode to automatically retry client calls to AWS services when encountering errors or exceptions.
6
8
9
+
## Timeout Configuration
10
+
11
+
<VersionBadgeversion="5.42.0" />
12
+
13
+
Every AWS API call is bounded by two timeouts:
14
+
15
+
- Connect timeout: seconds to wait to establish a connection (TCP, proxy tunnel and TLS handshake) to the AWS endpoint. Prowler's default is 10 seconds, configurable via `--aws-connect-timeout 5`.
16
+
- Read timeout: seconds to wait for a response once connected. Prowler's default is 60 seconds, configurable via `--aws-read-timeout 30`.
17
+
18
+
Both timeouts can also be set through environment variables, which is the way to tune them in Prowler Cloud and other deployments without a CLI:
19
+
20
+
```console
21
+
export PROWLER_AWS_BOTO3_CONNECT_TIMEOUT=5
22
+
export PROWLER_AWS_BOTO3_READ_TIMEOUT=30
23
+
```
24
+
25
+
CLI flags take precedence over the environment variables. Prowler sets both timeouts explicitly, so `AWS_DEFAULTS_MODE` and a `connect_timeout` in `~/.aws/config` are ignored; use the flag or the environment variable instead.
26
+
27
+
<Note>
28
+
Boto3 defaults both timeouts to 60 seconds. In networks with restricted egress (for example VPC endpoints for a subset of services, GovCloud or private deployments), every AWS service without a reachable endpoint used to cost up to 4 attempts × 60 seconds (the first call plus the 3 retries) for each region. Prowler lowers the connect timeout to 10 seconds so unreachable endpoints fail fast; lower it further together with `--aws-retries-max-attempts 0`, which disables retries and leaves a single attempt per call, if a scan still spends most of its time waiting on unreachable services.
29
+
30
+
</Note>
31
+
7
32
## Retry Behavior Overview
8
33
9
34
Boto3's Standard retry mode includes the following mechanisms:
10
35
11
-
- Maximum Retry Attempts: Default value set to 3, configurable via the `--aws-retries-max-attempts 5` argument.
36
+
- Maximum Retry Attempts: Default value set to 3, configurable via the `--aws-retries-max-attempts 5` argument.`0` disables retries.
12
37
13
38
- Expanded Error Handling: Retries occur for a comprehensive set of errors.
AWS provider default Boto3 connect timeout lowered from 60 to 10 seconds, so scans in restricted-egress networks (VPC endpoints for a subset of services, GovCloud, private deployments) no longer spend 4 minutes per region on every service whose endpoint is unreachable
`--aws-connect-timeout` and `--aws-read-timeout` CLI flags, plus `PROWLER_AWS_BOTO3_CONNECT_TIMEOUT` and `PROWLER_AWS_BOTO3_READ_TIMEOUT` environment variables, to bound how long each AWS API call waits for an endpoint
set_session_config returns a botocore Config object with the Prowler user agent and the default retrier configuration if nothing is passed as argument
1180
+
set_session_config returns a botocore Config object with the Prowler user agent and the default retrier and timeout configuration if nothing is passed as argument
1171
1181
1172
1182
Args:
1173
1183
- retries_max_attempts: The maximum number of retries for the standard retrier config
1184
+
- connect_timeout: Seconds to wait to establish a connection to an AWS endpoint
1185
+
- read_timeout: Seconds to wait for a response from an AWS endpoint
0 commit comments