def new_default_chain(cls, client_bootstrap=None): """ Create the default provider chain used by most AWS SDKs. Generally: 1. Environment 2. Profile 3. (conditional, off by default) ECS 4. (conditional, on by default) EC2 Instance Metadata Args: client_bootstrap (Optional[ClientBootstrap]): Client bootstrap to use when initiating socket connection. If not set, uses the default static ClientBootstrap instead. Returns: AwsCredentialsProvider: """ assert isinstance(client_bootstrap, ClientBootstrap) or client_bootstrap is None if client_bootstrap is None: client_bootstrap = ClientBootstrap.get_or_create_static_default() binding = _awscrt.credentials_provider_new_chain_default( client_bootstrap) return cls(binding)
def new_default_chain(cls, client_bootstrap): """ Create the default provider chain used by most AWS SDKs. Generally: (1) Environment (2) Profile (3) (conditional, off by default) ECS (4) (conditional, on by default) EC2 Instance Metadata """ assert isinstance(client_bootstrap, ClientBootstrap) binding = _awscrt.credentials_provider_new_chain_default( client_bootstrap) return cls(binding)
def new_default_chain(cls, client_bootstrap): """ Create the default provider chain used by most AWS SDKs. Generally: 1. Environment 2. Profile 3. (conditional, off by default) ECS 4. (conditional, on by default) EC2 Instance Metadata Args: client_bootstrap (ClientBootstrap): Client bootstrap to use when initiating socket connection. Returns: AwsCredentialsProvider: """ assert isinstance(client_bootstrap, ClientBootstrap) binding = _awscrt.credentials_provider_new_chain_default( client_bootstrap) return cls(binding)