Skip to content

SNOW-2338320: snowflake.connector.errors.ProgrammingError: 251018: 251018: No AWS region was found. Ensure the application is running on AWS. #2534

@mathiasflorin

Description

@mathiasflorin

Python version

3.10.7

Operating system and processor architecture

Linux 4.14

Installed packages

snowflake-connector-python==3.17.0

What did you do?

Use the connector in Airflow deployed on an EC2 instance in AWS.

What did you expect to see?

Connection is successful if AWS_DEFAULT_REGION is set.

Can you set logging to DEBUG and collect the logs?

import logging
import os

for logger_name in ('snowflake.connector',):
    logger = logging.getLogger(logger_name)
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
    logger.addHandler(ch)

Metadata

Metadata

Labels

bugstatus-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions