You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lorena Mesa (JIRA)" <ji...@apache.org> on 2018/03/14 19:07:00 UTC

[jira] [Created] (AIRFLOW-2216) Cannot specify a profile for AWS Hook to load with s3 config file

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)