Boto3¶
obstore.auth.boto3.Boto3CredentialProvider ¶
A CredentialProvider for S3Store that uses boto3.session.Session.
If the provided session has a region_name set, that will be passed down to the
store.
__init__ ¶
__init__(
session: Session | Session | None = None,
*,
ttl: timedelta = timedelta(minutes=30),
) -> None
Create a new Boto3CredentialProvider.
This will call session.get_credentials to get a
botocore.credentials.Credentials object. Each token refresh will call
credentials.get_frozen_credentials.
Parameters:
-
session(Session | Session | None, default:None) –A boto3 session to use for providing credentials. Defaults to None, in which case a new
boto3.Sessionwill be used.
Other Parameters:
-
ttl(timedelta) –The length of time each result from
get_frozen_credentialsshould live. Defaults to timedelta(minutes=30).
obstore.auth.boto3.StsCredentialProvider ¶
A CredentialProvider for S3Store that uses STS.Client.assume_role.
If the provided session has a region_name set, that will be passed down to the
store.
__init__ ¶
__init__(
session: Session | None = None,
**kwargs: Unpack[AssumeRoleRequestRequestTypeDef],
) -> None
Create a new StsCredentialProvider.
Parameters:
-
session(Session | None, default:None) –A boto3 session to use for providing credentials. Defaults to None, in which case a new
boto3.Sessionwill be used.
Other Parameters:
-
kwargs(Unpack[AssumeRoleRequestRequestTypeDef]) –arguments passed on to
STS.Client.assume_role.