lance_io::object_store

Function build_aws_credential

Source
pub async fn build_aws_credential(
    credentials_refresh_offset: Duration,
    credentials: Option<AwsCredentialProvider>,
    storage_options: Option<&HashMap<AmazonS3ConfigKey, String>>,
    region: Option<String>,
) -> Result<(AwsCredentialProvider, String)>
Expand description

Build AWS credentials

This resolves credentials from the following sources in order:

  1. An explicit credentials provider
  2. Explicit credentials in storage_options (as in aws_access_key_id, aws_secret_access_key, aws_session_token)
  3. The default credential provider chain from AWS SDK.

credentials_refresh_offset is the amount of time before expiry to refresh credentials.