pankajastro commented on code in PR #38536:
URL: https://github.com/apache/airflow/pull/38536#discussion_r1573321595


##########
airflow/providers/hashicorp/_internal_client/vault_client.py:
##########
@@ -318,15 +322,23 @@ def _auth_azure(self, _client: hvac.Client) -> None:
             )
 
     def _auth_aws_iam(self, _client: hvac.Client) -> None:
-        if self.auth_mount_point:
+        if self.key_id or self.secret_id or self.role_id:
             _client.auth.aws.iam_login(
                 access_key=self.key_id,
                 secret_key=self.secret_id,
                 role=self.role_id,
                 mount_point=self.auth_mount_point,
             )
-        else:
-            _client.auth.aws.iam_login(access_key=self.key_id, 
secret_key=self.secret_id, role=self.role_id)
+        elif self.aws_conn_id:

Review Comment:
   Removed aws_conn and added `arn_role` param PTAL. example config
   ```
   AIRFLOW__SECRETS__BACKEND_KWARGS='{"kv_engine_version": 1, "mount_point": 
"kv", "url": "http://35.161.42.91:8200/";, "auth_type": "aws_iam", "arn_role": 
"arn:aws:iam::<AWS_ACCOUNT>:role/role_name}'
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to