- The application retrieves application specific properties from an external configuration defined in AWS AppConfig.
- No properties are defined in application.properties of the spring boot application. All required application properties are fetched from configuration defined in Aws AppConfig.
- Data Source bean is created using the properties which are fetched from external configuration defined in AWS AppConfig.
- Application details are fetched from the properties which are fetched from external configuration defined in AWS AppConfig.
- Java 17.0 or more
- Maven
- MySQL database / any relational database
- AWS Account
- Create an IAM user and generate access keys.
- Save the "Access Key" and "Secret Key" generated from access keys and configure them AWS profile in local environment/System using AWS CLI
- Create an IAM role "mtb-task-exec-role". Attach permissions to access "AWS AppConfig" in the created role.
- Login to aws console https://aws.amazon.com/console/
- Navigate to AWS App Config
- Create an application provide name “ExternalConfig”
- Create configuration profile “showcase_sbc_skills” in the above defined application
- Select "AWS AppConfig hosted configuration" in configuration definition
- Update application related properties in configuration profile using freeform configuration in “yaml” format
- Define an environment “local” within an application.
- Deploy the configuration defined in application to the above created environment.
- Once the deployment is completed, above details are used in java application and retrieve the properties