mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 06:45:08 +00:00
chore(boto3): update boto3 config (#2459)
This commit is contained in:
@@ -11,6 +11,7 @@ from prowler.lib.logger import logger
|
||||
timestamp = datetime.today()
|
||||
timestamp_utc = datetime.now(timezone.utc).replace(tzinfo=timezone.utc)
|
||||
prowler_version = "3.5.3"
|
||||
boto3_user_agent_extra = "APN_1826889"
|
||||
html_logo_url = "https://github.com/prowler-cloud/prowler/"
|
||||
html_logo_img = "https://user-images.githubusercontent.com/3985464/113734260-7ba06900-96fb-11eb-82bc-d4f68a1e2710.png"
|
||||
square_logo_img = "https://user-images.githubusercontent.com/38561120/235905862-9ece5bd7-9aa3-4e48-807a-3a9035eb8bfb.png"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from boto3 import session
|
||||
from botocore.config import Config
|
||||
|
||||
from prowler.config.config import boto3_user_agent_extra
|
||||
from prowler.providers.aws.lib.audit_info.models import AWS_Assume_Role, AWS_Audit_Info
|
||||
|
||||
# Default Current Audit Info
|
||||
@@ -12,7 +13,10 @@ current_audit_info = AWS_Audit_Info(
|
||||
),
|
||||
# Default standard retrier config
|
||||
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html
|
||||
session_config=Config(retries={"max_attempts": 3, "mode": "standard"}),
|
||||
session_config=Config(
|
||||
retries={"max_attempts": 3, "mode": "standard"},
|
||||
user_agent_extra=boto3_user_agent_extra,
|
||||
),
|
||||
audited_account=None,
|
||||
audited_user_id=None,
|
||||
audited_partition=None,
|
||||
|
||||
@@ -3,6 +3,7 @@ import sys
|
||||
from botocore.config import Config
|
||||
from colorama import Fore, Style
|
||||
|
||||
from prowler.config.config import boto3_user_agent_extra
|
||||
from prowler.lib.logger import logger
|
||||
from prowler.providers.aws.aws_provider import (
|
||||
AWS_Provider,
|
||||
@@ -103,7 +104,8 @@ Azure Identity Type: {Fore.YELLOW}[{audit_info.identity.identity_type}]{Style.RE
|
||||
retries={
|
||||
"max_attempts": aws_retries_max_attempts,
|
||||
"mode": "standard",
|
||||
}
|
||||
},
|
||||
user_agent_extra=boto3_user_agent_extra,
|
||||
)
|
||||
# Merge the new configuration
|
||||
new_boto3_config = current_audit_info.session_config.merge(config)
|
||||
|
||||
Reference in New Issue
Block a user