try specifying region in the config

This commit is contained in:
Kenneth Kehl
2024-09-26 10:32:22 -07:00
parent cfc9acc6f2
commit feff8ec1be

View File

@@ -37,7 +37,7 @@ def s3upload(
aws_secret_access_key=secret_key,
region_name=region,
)
_s3 = session.resource("s3", config=AWS_CLIENT_CONFIG)
_s3 = session.resource("s3", endpoint_url="https://s3-fips.us-gov-west-1.amazonaws.com")
# This 'proves' that use of moto in the relevant tests in test_send.py
# mocks everything related to S3. What you will see in the logs is:
# Exception: CREATED AT <MagicMock name='resource().Bucket().creation_date' id='4665562448'>