[ 
https://issues.apache.org/jira/browse/AIRFLOW-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ash Berlin-Taylor updated AIRFLOW-3184:
---------------------------------------
    Labels: easy-fix  (was: )

Looking at the code the fix is probably in _get_credentials inside aws_hook - 
the try block should only re-raise the error if {{self.aws_conn_id != 
'aws_default'}}

> AwsHook with a conn_id that doesn't exist doesn't cause an error
> ----------------------------------------------------------------
>
>                 Key: AIRFLOW-3184
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3184
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: aws
>    Affects Versions: 1.9.0
>            Reporter: Ash Berlin-Taylor
>            Priority: Minor
>              Labels: easy-fix
>
> It is possible to create an S3Hook (which is a subclass of the AwsHook) with 
> an invalid connection ID, and rather than it causing an error of "connection 
> not found" or similar, it falls back to.... something, and continues 
> execution anyway.
> Simple repro code:
> {code}
> h = S3Hook('i-dontexist')
> h.list_keys(bucket_name="bucket", prefix="folder/")
> {code}
> Ideally the first line here should throw an exception of some form or other 
> (possibly _except_ in the case where the {{conn_id}} is the default value of 
> "aws_default") rather than it's current behaviour, as this made it more 
> difficult to track down the source of our problem.



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

Reply via email to