Search in sources :

Example 6 with DefaultAWSCredentialsProviderChain

use of com.amazonaws.auth.DefaultAWSCredentialsProviderChain in project archaius by Netflix.

the class DynamoDbConfigurationSourceIntegrationTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    try {
        dbClient = new AmazonDynamoDBClient(new DefaultAWSCredentialsProviderChain().getCredentials());
    } catch (Exception e) {
        e.printStackTrace();
    }
    System.setProperty("com.netflix.config.dynamo.tableName", tableName);
    if (dbClient != null) {
        createTable(dbClient, tableName);
        addElements(dbClient, tableName);
    }
}
Also used : DefaultAWSCredentialsProviderChain(com.amazonaws.auth.DefaultAWSCredentialsProviderChain) AmazonDynamoDBClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient) BeforeClass(org.junit.BeforeClass)

Example 7 with DefaultAWSCredentialsProviderChain

use of com.amazonaws.auth.DefaultAWSCredentialsProviderChain in project chassis by Kixeye.

the class DefaultCloudWatchFactory method getCloudWatchClient.

@Override
public AmazonCloudWatchClient getCloudWatchClient() {
    AmazonCloudWatchClient client;
    if (StringUtils.isBlank(accessKeyId) || StringUtils.isBlank(secretKey)) {
        LOGGER.debug("Constructing AmazonCloudWatchClient using DefaultAWSCredentialsProviderChain for region {}.", region);
        client = new AmazonCloudWatchClient(new DefaultAWSCredentialsProviderChain());
    } else {
        LOGGER.debug("Constructing AmazonCloudWatchClient from given credentials for region {}.", region);
        client = new AmazonCloudWatchClient(new BasicAWSCredentials(accessKeyId, secretKey));
    }
    client.setRegion(region);
    return client;
}
Also used : DefaultAWSCredentialsProviderChain(com.amazonaws.auth.DefaultAWSCredentialsProviderChain) AmazonCloudWatchClient(com.amazonaws.services.cloudwatch.AmazonCloudWatchClient) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials)

Example 8 with DefaultAWSCredentialsProviderChain

use of com.amazonaws.auth.DefaultAWSCredentialsProviderChain in project apex-malhar by apache.

the class KinesisTestProducer method createClient.

private void createClient() {
    AWSCredentialsProvider credentials = new DefaultAWSCredentialsProviderChain();
    client = new AmazonKinesisClient(credentials);
}
Also used : DefaultAWSCredentialsProviderChain(com.amazonaws.auth.DefaultAWSCredentialsProviderChain) AmazonKinesisClient(com.amazonaws.services.kinesis.AmazonKinesisClient) AWSCredentialsProvider(com.amazonaws.auth.AWSCredentialsProvider)

Example 9 with DefaultAWSCredentialsProviderChain

use of com.amazonaws.auth.DefaultAWSCredentialsProviderChain in project apex-malhar by apache.

the class KinesisOperatorTestBase method createClient.

private void createClient() {
    credentials = new DefaultAWSCredentialsProviderChain();
    client = new AmazonKinesisClient(credentials);
}
Also used : DefaultAWSCredentialsProviderChain(com.amazonaws.auth.DefaultAWSCredentialsProviderChain) AmazonKinesisClient(com.amazonaws.services.kinesis.AmazonKinesisClient)

Example 10 with DefaultAWSCredentialsProviderChain

use of com.amazonaws.auth.DefaultAWSCredentialsProviderChain in project apex-malhar by apache.

the class KinesisTestConsumer method createClient.

private void createClient() {
    AWSCredentialsProvider credentials = new DefaultAWSCredentialsProviderChain();
    client = new AmazonKinesisClient(credentials);
}
Also used : DefaultAWSCredentialsProviderChain(com.amazonaws.auth.DefaultAWSCredentialsProviderChain) AmazonKinesisClient(com.amazonaws.services.kinesis.AmazonKinesisClient) AWSCredentialsProvider(com.amazonaws.auth.AWSCredentialsProvider)

Aggregations

DefaultAWSCredentialsProviderChain (com.amazonaws.auth.DefaultAWSCredentialsProviderChain)10 AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)6 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)3 AmazonKinesisClient (com.amazonaws.services.kinesis.AmazonKinesisClient)3 AmazonDynamoDBClient (com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient)2 BeforeClass (org.junit.BeforeClass)2 ClientConfiguration (com.amazonaws.ClientConfiguration)1 AWSCredentials (com.amazonaws.auth.AWSCredentials)1 AWSCredentialsProviderChain (com.amazonaws.auth.AWSCredentialsProviderChain)1 AWSSessionCredentials (com.amazonaws.auth.AWSSessionCredentials)1 EnvironmentVariableCredentialsProvider (com.amazonaws.auth.EnvironmentVariableCredentialsProvider)1 SystemPropertiesCredentialsProvider (com.amazonaws.auth.SystemPropertiesCredentialsProvider)1 ProfileCredentialsProvider (com.amazonaws.auth.profile.ProfileCredentialsProvider)1 StaticCredentialsProvider (com.amazonaws.internal.StaticCredentialsProvider)1 AmazonCloudWatchClient (com.amazonaws.services.cloudwatch.AmazonCloudWatchClient)1 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)1 S3ClientOptions (com.amazonaws.services.s3.S3ClientOptions)1 AccessControlList (com.amazonaws.services.s3.model.AccessControlList)1 TransferManager (com.amazonaws.services.s3.transfer.TransferManager)1 TransferManagerConfiguration (com.amazonaws.services.s3.transfer.TransferManagerConfiguration)1