"""Config file for lambda function.""" from os import getenv APPLICATION_NAME = "lambda-business-solutions-automations-snowflake-query" # AWS region configuration AWS_REGION = getenv("AWS_REGION", "us-east-1") # Environment setup ENVIRONMENT = getenv("ENVIRONMENT", "qa") # AWS Secrets Manager secret ID for the Snowflake private key AWS_SNOWFLAKE_PRIVATE_KEY_SECRET_ID: str = getenv( "AWS_SNOWFLAKE_PRIVATE_KEY_SECRET_ID", f"{ENVIRONMENT}/business-solutions-automations/" f"SNOWFLAKE_QUERY_SNOWFLAKE_PRIVATE_KEY", # Default value ) # Snowflake client settings SNOWFLAKE_CLIENT_SETTINGS: dict[str, str] = { "user": "ORCHARD_YT_AUDITS", "account": "orchard", "warehouse": "DEV_ANALYTICS_ORCHARD", "database": "ORCHARD_APP_REPORTING_V2", "schema": "ART_RELATIONS_PROD_ART_RELATIONS", "private_key": None, # For security, dynamically set from AWS Secrets Manager } # This is the name of the S3 stage in Snowflake where results will be staged, # when they're to be stored in S3 (see S3_STAGING_BUCKET for target bucket). # Example: "qa-business-solutions-automations-s3-stage" SNOWFLAKE_S3_STAGE = getenv( "SNOWFLAKE_S3_STAGE", f"{ENVIRONMENT}-business-solutions-automations-s3-stage", ) # This is the bucket where Snowflake will stage the results of the query. # Make sure this bucket exists and Snowflake is configured to use it for staging. # Example: "qa-sf-query-results" S3_STAGING_BUCKET: str = getenv( "S3_STAGING_BUCKET", f"{ENVIRONMENT}-sf-query-results", ) # This is the prefix for the files that will be staged in S3 / User Stage in Snowflake. STAGING_FILE_PREFIX: str = "results_"