-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AWS Connection docs and deprecate some extras #24670
Conversation
@@ -83,6 +83,15 @@ def create_session(self) -> boto3.session.Session: | |||
self.extra_config["session_kwargs"], | |||
) | |||
session_kwargs = self.extra_config["session_kwargs"] | |||
|
|||
if "profile" in self.extra_config and "s3_config_file" not in self.extra_config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is s3 specific logic being added to the AWS base session class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why initially it added in AWS Hook or why I add this warning?
Answer for fist part: #2532 (comment)
Answer for second part: This parameter exist in documentation since version 1.1.0 without mentioning how it actually works, I've just add warning to inform user.
Changes
aws_account_id
,aws_iam_role
,external_id
,s3_config_file
,s3_config_format
,profile
Good candidate for future deprecation:
s3_config_file
,s3_config_format
,profile
This options migrated from legacy S3Hook 3865836 in Airflow 1.9, and never been documented and well-tested. This use for parse local credentials file in selected formats:boto config files - boto not maintained for many yearsAWS Shared Credentials file. In current implementation only get parts credentials. If need to specify non default location to AWS Shared Credentials and AWS Config files better to use configuration of botocore.sessionSession. In this case also could use additional abilities such as credential_process, and profiles inheritance.s3cmd - Seems like this utility never been part of Airflowhost
might confuse users (actually couple of issues exists in Github) better rename toendpoint_url
session_kwargs
- onlyprofile_name
could be use as part of this dictionary, other boto3.session.Session arguments stored directly in extra@ferruzzi @o-nikolas