AWSCredentialsProvider

Objective-C

@protocol AWSCredentialsProvider <NSObject>

Swift

protocol AWSCredentialsProvider : NSObjectProtocol

The AWS credentials provider protocol used to provide credentials to the SDK in order to make calls to the AWS services.

  • Asynchronously returns a valid AWS credentials or an error object if it cannot retrieve valid credentials. It should cache valid credentials as much as possible and refresh them when they are invalid.

    Declaration

    Objective-C

    - (nonnull AWSTask<AWSCredentials *> *)credentials;

    Swift

    func credentials() -> AWSTask

    Return Value

    A valid AWS credentials or an error object describing the error.

  • Invalidates the cached temporary AWS credentials. If the credentials provider does not cache temporary credentials, this operation is a no-op.

    Declaration

    Objective-C

    - (void)invalidateCachedTemporaryCredentials;

    Swift

    func invalidateCachedTemporaryCredentials()