AWSStaticCredentialsProvider

Objective-C

@interface AWSStaticCredentialsProvider : NSObject <AWSCredentialsProvider>

Swift

class AWSStaticCredentialsProvider : NSObject, AWSCredentialsProvider

Warning

This credentials provider is intended only for testing purposes. We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using AWSCognitoCredentialsProvider.
  • Instantiates a static credentials provider.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccessKey:(nonnull NSString *)accessKey
                                    secretKey:(nonnull NSString *)secretKey;

    Swift

    init(accessKey: String, secretKey: String)

    Parameters

    accessKey

    An AWS Access key.

    secretKey

    An AWS Secret key.

    Return Value

    An AWS credentials object.