airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorena Mesa (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-2216) Cannot specify a profile for AWS Hook to load with s3 config file
Date Wed, 14 Mar 2018 19:07:00 GMT
Lorena Mesa created AIRFLOW-2216:
------------------------------------

             Summary: Cannot specify a profile for AWS Hook to load with s3 config file
                 Key: AIRFLOW-2216
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2216
             Project: Apache Airflow
          Issue Type: Bug
          Components: operators
    Affects Versions: 1.9.0
         Environment: IDE: PyCharm
Airflow 1.9
Python 3.4.3
            Reporter: Lorena Mesa


Currently the source code for AWS Hook doesn't permit the user to provide a profile when their
aws connection object specifies in the extra param's information on s3_config_file:
{code:java}
def _get_credentials(self, region_name):
    aws_access_key_id = None
    aws_secret_access_key = None
    aws_session_token = None
    endpoint_url = None

    if self.aws_conn_id:
        try:
        # Cut for brevity
        elif 's3_config_file' in connection_object.extra_dejson:
             aws_access_key_id, aws_secret_access_key = \
            _parse_s3_config(connection_object.extra_dejson['s3_config_file'],
                       connection_object.extra_dejson.get('s3_config_format'),
                         connection_object.extra_dejson.get('profile')){code}

The _parse_s3_config method has a param for profile set to none, so by not providing it in
the method you cannot now specify a profile credential to be loaded. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message