Java 类com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsyncClientBuilder 实例源码

项目:webcrawler    文件:AppConfig.java   
@Bean
public AmazonDynamoDBAsync getDynamoDBClient() {

    return AmazonDynamoDBAsyncClientBuilder.standard()
            .withCredentials(new ProfileCredentialsProvider(CREDENTIALS_PROVIDER))
            .withRegion(Regions.AP_SOUTHEAST_2)
            .build();

}
项目:eventasia    文件:EventasiaDynamoDBConfig.java   
@PostConstruct
public void connect(){
    BasicAWSCredentials basicAWSCredentials = new BasicAWSCredentials(accessKey, secretKey);
    AmazonDynamoDB client = AmazonDynamoDBAsyncClientBuilder
            .standard()
            .withRegion(region)
            .withCredentials(new AWSStaticCredentialsProvider(basicAWSCredentials))
            .build();

    dynamoDB = new DynamoDB(client);
    mapper = new DynamoDBMapper(client);
}