Skip to content

Instantly share code, notes, and snippets.

View heckler's full-sized avatar

Claudio Heckler heckler

View GitHub Profile
@maresb
maresb / managed_temporary_credentials_provider.py
Last active July 16, 2024 13:01
Make boto3 automatically check the shared credentials file for updates.
"""Make boto3 automatically check the shared credentials file for updates.
In some situations, the ~/.aws/credentials file may be periodically updated. For
example, this is the case with the "AWS managed temporary credentials" which are
provided to AWS Cloud9 environments. (See
<https://docs.aws.amazon.com/cloud9/latest/user-guide/how-cloud9-with-iam.html#auth-and-access-control-temporary-managed-credentials>.)
Example usage of this module is:
import boto3