You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/09/02 18:06:04 UTC

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

    [ https://issues.apache.org/jira/browse/AIRFLOW-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601560#comment-16601560 ] 

Apache Spark commented on AIRFLOW-2216:
---------------------------------------

User 'lorenanicole' has created a pull request for this issue:
https://github.com/apache/incubator-airflow/pull/3172

> 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
>            Assignee: Lorena Mesa
>            Priority: Minor
>
> 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)