don't use global s3 client

This commit is contained in:
Kenneth Kehl
2025-06-27 12:12:43 -07:00
parent e7d9d02a34
commit 8573b4d67e
2 changed files with 37 additions and 55 deletions

View File

@@ -13,6 +13,7 @@ from app import job_cache, job_cache_lock
from app.clients import AWS_CLIENT_CONFIG
# from app.service.rest import get_service_by_id
from app.utils import hilite
from notifications_utils import aware_utcnow
FILE_LOCATION_STRUCTURE = "service-{}-notify/{}.csv"
@@ -78,7 +79,9 @@ def get_s3_client():
aws_secret_access_key=secret_key,
region_name=region,
)
current_app.logger.info(hilite("About to call session.client"))
s3_client = session.client("s3", config=AWS_CLIENT_CONFIG)
current_app.logger.info(hilite("SESSION CALLED"))
return s3_client