spring-cloud-aws
spring-cloud-aws copied to clipboard
ParameterStore: updated values in SSM parameter store are not propagated to spring application
Type: Bug
Component: Parameter Store
Describe the bug Updated values in AWS parameter store are not propagated to running application.
How to reproduce
- Start sample application (https://github.com/miloszpiglas/spring-demo-ssm)
- Change value of "/config/message" in SSM.
- Observe logs from https://github.com/miloszpiglas/spring-demo-ssm/blob/013a255a544fcdf3ac976627932cf7c9a0ce4be5/src/main/java/com/example/demo/MyConfig.java#L17
Changes in SSM are detected but MyConfig.message is updated with old value. I believe it is cause by implementation of method io.awspring.cloud.autoconfigure.config.reload.PollingAwsPropertySourceChangeDetector.executeCycle()
. New values are only loaded in local copy of ParameterStorePropertySource
however environment is updated with values that were loaded during application start.
Sample Sample application https://github.com/miloszpiglas/spring-demo-ssm
Hi guys, I've the same issue. Any update on this?
Update: The reload work normally in my app after I explicit declare "strategy: refresh". I though i was set by default
@miloszpiglas in your sample you're binding configuration properties without a prefix. I think this may be a problem.
I made a fully working sample where reload works as expected: https://github.com/maciej-scratches/spring-cloud-aws-gh-1003