class CommonBeans {

  @Bean
  @Profile("test")
  AmazonS3 amazonS3Test() {
    String s3Endpoint = System.getProperty("aws.s3.endpoint");
    String region = System.getProperty("aws.region");

    EndpointConfiguration endpointConfiguration = new EndpointConfiguration(s3Endpoint, region);
    return AmazonS3ClientBuilder.standard()
        .withEndpointConfiguration(endpointConfiguration)
        .build();
  }

}