Class JavaCredentialsProviderImpl

    • Constructor Detail

      • JavaCredentialsProviderImpl

        public JavaCredentialsProviderImpl​(@Nonnull
                                           com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider)
        Constructor for non-temporary credential provider. Access Key ID + Secret Key (no session token). Also known as long-lived credentials. Not recommended for production use.
        Parameters:
        awsCredentialsProvider - credential provider
        See Also:
        Using AWS access keys to authenticate AWS SDKs and tools
      • JavaCredentialsProviderImpl

        public JavaCredentialsProviderImpl​(@Nonnull
                                           com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider,
                                           long rotationPeriodInMillis)
        Constructor for temporary credential provider with token rotation period (has a session token) (i.e. token expires for every 5 minutes). The KVS Producer client will refresh the credentials based on the provider's configured rotation interval. During client initialization, the Producer client fetches the latest credentials once, and then every rotationPeriod interval afterward.
        Parameters:
        awsCredentialsProvider - AWS credentials provider to use
        rotationPeriodInMillis - Token expires periodically for every rotationPeriodInMillis milliseconds. It is important to configure the rotationPeriod to be less than the AWS-configured expiration time (e.g. role duration seconds) to prevent the client from using stale credentials during API operations.
        See Also:
        updateCredentials()