export declare type AwsCredentialConfig = AwsCredentialsConfig | AwsAssumedRoleCredentialsConfig | AwsECSCredentialsConfig; export declare function isBasicAwsCredentials(creds: AwsCredentialConfig): creds is AwsCredentialsConfig; export declare function isAssumedRoleCredentials(config: AwsCredentialConfig): config is AwsAssumedRoleCredentialsConfig; export declare function isEcsCredentials(config: AwsCredentialConfig): config is AwsECSCredentialsConfig; export interface AwsCredentialsConfig { /** * AWS access key id to use for AWS authentication. */ accessKeyId: string; /** * AWS secret key to use for AWS authentication. */ accessSecret: string; /** * AWS session token to use for AWS STS authentication. */ sessionToken?: string; awsAccountId?: string; } export interface AwsAssumedRoleCredentialsConfig extends AwsCredentialsConfig { /** * If specified, the provided access key/secret will be used as master credentials to assume the provided * role (which can be of a different AWS account), using the STS AssumeRole API. * * assumeRoleSessionName must also be specified for this to take effect. */ assumeRoleArn: string; /** * If assumeRoleArn is specified, this will be used as a diagnostic string (i.e., in CloudTrail logs) to identify * the client that is assuming the role. This should be something descriptive, like `foo-service-local-dev-iang`. * It does not need to be unique. */ assumeRoleSessionName: string; } export interface AwsECSCredentialsConfig { /** * Instruct this library that the caller has ECS IAM roles for tasks enabled * in the runtime environment, so no explicit credentials are passed in. * * The only valid value for this is true, this is for documentation purposes. * It makes clear that the consumer is opting to use the ECS task role * temporary credentials. * * For more information on ECS IAM roles for Tasks, see * https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html * * Also see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECSCredentials.html */ useTaskRole: true; }