mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 14:48:25 -04:00
try specifying region in the config
This commit is contained in:
@@ -12,8 +12,7 @@ AWS_CLIENT_CONFIG = Config(
|
|||||||
s3={
|
s3={
|
||||||
"addressing_style": "virtual",
|
"addressing_style": "virtual",
|
||||||
},
|
},
|
||||||
use_fips_endpoint=os.getenv("NOTIFY_ENVIRONMENT") in ['demo', 'production'],
|
use_fips_endpoint=True,
|
||||||
region_name="us-gov-west-1",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +29,10 @@ def get_s3_object(
|
|||||||
aws_secret_access_key=secret_key,
|
aws_secret_access_key=secret_key,
|
||||||
region_name=region,
|
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"
|
||||||
|
)
|
||||||
obj = s3.Object(bucket_name, filename)
|
obj = s3.Object(bucket_name, filename)
|
||||||
# This 'proves' that use of moto in the relevant tests in test_send.py
|
# 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:
|
# mocks everything related to S3. What you will see in the logs is:
|
||||||
|
|||||||
Reference in New Issue
Block a user