boto3_refresh_session.session.RefreshableSession#
- class boto3_refresh_session.session.RefreshableSession(method: Literal['sts', 'ecs', 'custom'] = 'sts', **kwargs)[source]#
Factory class for constructing refreshable boto3 sessions using various authentication methods, e.g. STS.
This class provides a unified interface for creating boto3 sessions whose credentials are automatically refreshed in the background.
Use
RefreshableSession(method="...")
to construct an instance using the desired method.For additional information on required parameters, refer to the See Also section below.
- Parameters:
- methodMethod
The authentication and refresh method to use for the session. Must match a registered method name. Default is “sts”.
- Other Parameters:
- **kwargsdict
Additional keyword arguments forwarded to the constructor of the selected session class.
See also