Amazon Parameter Store
Parameter Store is part of AWS Systems Manager service and is used for storing parameters, that can be obtained from applications.
Parameter Store
Parameter Store is part of AWS Systems Manager service and is used for storing parameters,
that can be obtained from applications.
Setup
1. Add Spring Cloud dependency to the Instance's build.gradle
build.gradle
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-aws-parameter-store-config', version: '2.2.6.RELEASE'
2. Disable spring-cloud-starter-aws-parameter-store-config
on local in bootstrap.yml
spring-cloud-starter-aws-parameter-store-config
on local in bootstrap.yml
aws:
paramstore:
enabled: false
3. Configure application to match parameters stored in cloud
Parameters are stored with following naming convention:
$prefix/$applicationName$profileSeparator$profile/$propertyName
for Neo, it would look like:
/config/hub-instance-neo_test-ie/api.worldcheck.authKey
where:
- prefix is by default
/config
, it has to start with/
- applicationName is by default Spring application name defined in
spring.application.name
- profileSeparator is by default
_
- profile is any of Spring active profiles, if multiple are active, this will rotate through all of them
- propertyName is standard Spring property name that would be used in
application.properties
these values can be changed in bootstrap.yml
:
aws:
paramstore:
name: hub-instance-neo
prefix: /config
profile-separator: _
Updated 4 months ago