From f62e3269f07045069896b400cc6ae62054a95fe0 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 20 May 2025 14:02:06 -0700 Subject: [PATCH 1/2] switch to fips endpoint --- app/aws/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/aws/s3.py b/app/aws/s3.py index cbc3d9f2e..cc376ad24 100644 --- a/app/aws/s3.py +++ b/app/aws/s3.py @@ -80,7 +80,7 @@ def get_s3_client(): aws_secret_access_key=secret_key, region_name=region, ) - s3_client = session.client("s3") + s3_client = session.client("s3", config=AWS_CLIENT_CONFIG) return s3_client From 860d4c73e353d650a265b76c99828999a500e8ea Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 20 May 2025 14:16:57 -0700 Subject: [PATCH 2/2] fix test --- tests/app/aws/test_s3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app/aws/test_s3.py b/tests/app/aws/test_s3.py index 467ce6829..52ea60f4e 100644 --- a/tests/app/aws/test_s3.py +++ b/tests/app/aws/test_s3.py @@ -1,7 +1,7 @@ import os from datetime import timedelta from os import getenv -from unittest.mock import MagicMock, Mock, call, patch +from unittest.mock import ANY, MagicMock, Mock, call, patch import botocore import pytest @@ -461,7 +461,7 @@ def test_get_s3_client(mocker): mock_session.return_value.client.return_value = mock_s3_client result = get_s3_client() - mock_session.return_value.client.assert_called_once_with("s3") + mock_session.return_value.client.assert_called_once_with("s3", config=ANY) assert result == mock_s3_client