chriskessel opened a new issue #16616:
URL: https://github.com/apache/airflow/issues/16616
I'm using the S3Hook, passing it a connection id and for some reason it's
not able to find it if that connection is defined as an environment variable.
```
sftp_hook = SFTPHook(ftp_conn_id=self.sftp_conn_id)
```
```
File
"/opt/bitnami/airflow/venv/lib/python3.8/site-packages/airflow/models/connection.py",
line 379, in get_connection_from_secrets
raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined")
airflow.exceptions.AirflowNotFoundException: The conn_id `sftp_local` isn't
defined
```
The connection is definitely there, I can see it if I use the CLI to `get
connections sftp_local`
```
$ airflow connections get sftp_local
id | conn_id | conn_type | blah blah
None | sftp_local | sftp | blah blah
```
I'm using other environment variables for connections (AWS Athena/S3
connections) and they work, so I'm not sure if I'm doing something wrong or
it's a bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]