diff --git a/ingest_api/runtime/src/config.py b/ingest_api/runtime/src/config.py index 97e7c5d5..2183bbda 100644 --- a/ingest_api/runtime/src/config.py +++ b/ingest_api/runtime/src/config.py @@ -15,7 +15,7 @@ class Settings(BaseSettings): description="URL of JWKS, e.g. https://cognito-idp.{region}.amazonaws.com/{userpool_id}/.well-known/jwks.json" # noqa ) - data_access_role_arn: AwsArn = Field( # type: ignore + data_access_role_arn: Optional[AwsArn] = Field( # type: ignore description="ARN of AWS Role used to validate access to S3 data" ) diff --git a/ingest_api/runtime/src/validators.py b/ingest_api/runtime/src/validators.py index 0abee3ba..ff057d5c 100644 --- a/ingest_api/runtime/src/validators.py +++ b/ingest_api/runtime/src/validators.py @@ -9,8 +9,10 @@ def get_s3_credentials(): from src.main import settings - print("Fetching S3 Credentials...") + if not settings.data_access_role_arn: + return {} + print("Fetching S3 Credentials...") response = boto3.client("sts").assume_role( RoleArn=settings.data_access_role_arn, RoleSessionName="stac-ingestor-data-validation",