title: Factory method 'amazonS3Client' : Access key cannot be null
body: <p>Trying to connect with aws-s3 using spring boot application. when i am using </p>
  
  <blockquote>
    <p>import org.springframework.cloud.aws.context.support.io.ResourceLoaderBeanPostProcessor</p>
  </blockquote>
  
  <p>getting aws key can not be null. </p>
  
  <pre><code> @Configuration
   @EnableContextResourceLoader
   @EnableContextCredentials
   public class S3Configuration {
  
          @Value("${cloud.aws.credentials.accessKey}")
          private String ACCESS_KEY;
          @Value("${cloud.aws.credentials.secretKey}")
          private String SECRET_KEY;
  
          @Value("${cloud.aws.region}")
          private String region;
  
  @Bean
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      return new PropertySourcesPlaceholderConfigurer();
  }
  
  @Bean
  public AmazonS3Client amazonS3Client() {
      return new AmazonS3Client(new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY));
  }
  
  @Bean
  public ResourceLoaderBeanPostProcessor resourceLoaderBeanPostProcessor() {
      return new ResourceLoaderBeanPostProcessor(amazonS3Client());
  }
  }
  </code></pre>
  
  <p>If I dont use "ResourceLoaderBeanPostProcessor" class then AmazonS3Client object is creating successfully by reading properties form application.properties. </p>
  
  <p>can some one help me what i am doing wrong?</p>