snowflakedb / SnowAlert

Security Analytics Using The Snowflake Data Warehouse
Apache License 2.0
181 stars 57 forks source link

SNS handler specifies invalid region #606

Closed ugmuka closed 2 years ago

ugmuka commented 2 years ago

In AWS SNS handler, parameter region_name in boto3 client is read from environment variable SNOWFLAKE_REGION. https://github.com/snowflakedb/SnowAlert/blob/8df0c9edde054463776fa58e88036ee2a783a41f/src/runners/handlers/sns.py#L31

However, AWS region is different from Snowalake region(ex. us-west-2.aws). Boto3 region should be specified from different environment variable such as AWS_DEFAULT_REGION.

sfc-gh-afedorov commented 2 years ago

good call, ty. if AWS_SNS_HANDLER_REGION is present, let's use that, otherwise fall back on AWS_DEFAULT_REGION and only if those two are missing fall back on SNOWFLAKE_REGION.

ugmuka commented 2 years ago

Thank you for your review. When do you plan to release v1.10.0?

sfc-gh-afedorov commented 2 years ago

@sfc-gh-nlele may have a more concrete timeline towards release, but we auto-build snowsec/snowalert:1.10-rc off the release branch -- does that work all right for your use-case?

ugmuka commented 2 years ago

No problem. I'll use snowsec/snowalert:1.10-rc image. Best regards,