zhongjiajie commented on a change in pull request #8534:
URL: https://github.com/apache/airflow/pull/8534#discussion_r415184153
##########
File path: airflow/providers/amazon/aws/hooks/base_aws.py
##########
@@ -62,16 +63,14 @@ class AwsBaseHook(BaseHook):
def __init__(
self,
- aws_conn_id="aws_default",
+ aws_conn_id: Optional[str] = "aws_default",
Review comment:
I think we should not use `Optional ` here. Should only use in default
`None`, am I wrong?
##########
File path: airflow/providers/amazon/aws/hooks/base_aws.py
##########
@@ -254,7 +253,7 @@ def _assume_role(
assume_role_kwargs["ExternalId"] = extra_config.get(
"external_id"
)
- role_session_name = "Airflow_" + self.aws_conn_id
+ role_session_name = "Airflow_" + str(self.aws_conn_id)
Review comment:
How about
```suggestion
role_session_name = f"Airflow_{self.aws_conn_id}"
```
----------------------------------------------------------------
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]