ashb commented on a change in pull request #11410:
URL: https://github.com/apache/airflow/pull/11410#discussion_r507632277
##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -106,24 +108,30 @@ def __init__( # pylint: disable=too-many-arguments
def execute(self, context):
postgres_hook = PostgresHook(postgres_conn_id=self.redshift_conn_id)
- s3_hook = S3Hook(aws_conn_id=self.aws_conn_id, verify=self.verify)
- credentials = s3_hook.get_credentials()
+ if self.aws_iam_role is not None:
+ access_options = "IAM_ROLE '{}'".format(self.aws_iam_role)
+ else:
+ s3_hook = S3Hook(aws_conn_id=self.aws_conn_id, verify=self.verify)
+ credentials = s3_hook.get_credentials()
Review comment:
I wonder if we should look at the `aws_iam_role` field of extras -
http://airflow.apache.org/docs/stable/howto/connection/aws.html as well?
----------------------------------------------------------------
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]