Get boto3.session.Session by appropriate method #25569
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now AWS Hooks obtain
boto3.session.Session
usual by call_get_credentials
. This method returnTuple[boto3.session.Session, Optional[str]]
and actually not return credentials, only session andendpoint_url
.Since #25336 all hook/connections configs stored in
conn_config
cached property, we do not need to call_get_credentials
to obtainendpoint_url
as well as other connection attributes.Also change all aws hooks which uses this
_get_credentials
.Right now (main branch) other providers do not use this method directly, however current version of PostgreSQL provider use this method (#25424), so we can't remove
_get_credentials
.Some minor changes - remove information about that S3 Bucket has not region (#20463). In fact AWS S3 Buckets has region in other hand you could access to any buckets from any region if you have a permission (might be only one limitation endpoint should be in the same AWS Region Partition).
cc: @vincbeck @ferruzzi @o-nikolas @potiuk