Build Status

Spring S3 Property Loader

S3 Property Loader has the aim of allowing loading of Spring property files from S3 bucket, in order to guarantee stateless machine configuration.

Spring PropertyConfigurer uses PropertiesFactoryBean to load property files from AWS S3 bucket.



repositories {  
compile "com.spring.loader:s3-loader:2.2.2"



How to use

Refreshing properties in runtime

You can force your application to load properties from S3 again without restart. S3 Properties Loader uses a Spring Cloud feature that allows the spring beans annotated with @RefreshScope to reload properties. To work, it is only necessary to inject the S3PropertiesContext bean and call refresh() method. After this, S3 Properties Loader will get properties again from s3 bucket defined previously and refresh your beans annotated with @RefreshScope.

tip: You can create a endpoint that calls this class and refresh your application via endpoint or create a @Scheduled class which updates from time to time.


public SomeController {

   private S3PropertiesContext s3PropertiesContext;

   public void refresh() {


Official spring aws sdk lib.

Problems and Issues

Found some bug? Have some enhancement ? Open a Issue here