Nik
Nik

Reputation: 5745

Spring boot configs in S3 - AWS beanstalk

I have aspring boot application running in AWS beanstalk. It currently reads the properties from src/main/resources/application.properties file. I want to override those configuration by providing the properties as a file in S3. So I created a file in S3 at s3://my-bucket/some_dir/application.properties. In the beanstalk application, I provided the following setting in Software Configuration.

spring.config.location with value s3://my-bucket/some_dir/application.properties.

Restarted the app but I still see the old values. I had followed the documentation here.

What am I doing wrong?

Upvotes: 3

Views: 1271

Answers (1)

Strelok
Strelok

Reputation: 51451

That just won't work. Spring doesn't just understand s3:// URLs. Create a startup script for your app that first downloads the file then passes it to your app with --spring.config.locations.

Upvotes: 1

Related Questions