Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Finovertech/vertx-config-aws-ssm
A Vert.X (v3) Config Store backed by AWS SSM.
https://github.com/Finovertech/vertx-config-aws-ssm
Last synced: 3 months ago
JSON representation
A Vert.X (v3) Config Store backed by AWS SSM.
- Host: GitHub
- URL: https://github.com/Finovertech/vertx-config-aws-ssm
- Owner: Finovertech
- License: apache-2.0
- Created: 2017-10-17T15:32:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T17:19:06.000Z (about 6 years ago)
- Last Synced: 2024-04-11T12:36:11.613Z (7 months ago)
- Language: Java
- Size: 18.6 KB
- Stars: 1
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- vertx-awesome - Vert.x Config AWS SSM Store - A [config store](http://vertx.io/docs/vertx-config/java/) implementation for retrieving configuration values from the [AWS EC2 SSM Parameter Store](https://aws.amazon.com/ec2/systems-manager/parameter-store/). (Config)
README
# vertx-config-aws-ssm
A [Vert.X (v3) Config Store](http://vertx.io/docs/vertx-config/java/) backed by AWS SSM.Built on top of the [vertx-config project](https://github.com/vert-x3/vertx-config/).
See the [Maven Repository](https://mvnrepository.com/artifact/com.finovertech/vertx-config-aws-ssm), and the [Snapshot index](https://oss.sonatype.org/content/groups/public/com/finovertech/vertx-config-aws-ssm/).
### AWS Configuration Store
The AWS Configuration Store is an extension to the Vert.x Configuration Retriever to retrieve configuration from the [AWS EC2 SSM Parameter Store](https://aws.amazon.com/ec2/systems-manager/parameter-store/).
### Using the AWS Configuration Store
To use the AWS Configuration, add the following dependency to the *dependencies* section of your build descriptor:
Maven (in your `pom.xml`, under ``):
```xmlcom.finovertech
vertx-config-aws-ssm
0.2.0io.vertx
vertx-config
3.5.0```
if the version you are accessing is a snapshot, under ``:
```xmloss.sonatype.org-snapshot
http://oss.sonatype.org/content/repositories/snapshots
false
true```
Gradle (in your `build.gradle`, under `dependencies`):
```groovy
compile 'io.vertx:vertx-config:3.5.0'
compile 'com.finovetech:vertx-config-aws-ssm:0.3.0'
```
if the version you are accessing is a snapshot, under `repositories`:
```groovy
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
```### Configuring the store
Once added to your classpath or dependencies, you need to configure the `ConfigRetriever` to use this store.
```java
ConfigStoreOptions aws = new ConfigStoreOptions()
.setType("aws-ssm")
.setConfig(new JsonObject()
.put("path", "/yourBasePath")
.put("recursive", false)
.put("decrypt", true)
.put("removePathPrefix", true)ConfigRetriever retriever = ConfigRetriever.create(vertx,
new ConfigRetrieverOptions().addStore(aws));
```
The configuration requires:* the `path` within the AWS parameter store to use as the base path.
Optionally, you can also configure whether to get parameters from the store recursively (`recursive` boolean, `true` by default),
and whether to decrypt encrypted values (`decrypt` boolean, `true` by default). Results from SSM will be full path by default
(`path` is /test, then param name will be `/test/param1`). If you want the `path` directory trimmed from the result set, then
specify `removePathPrefix` to be `true` and the path prefix will be chopped off (new name of `param1`).You will also need to configure your default AWS credentials and region. That can be done in your `pom.xml` file
or your `build.gradle` file, or before you create the `ConfigRetriever` in your code.### How does it work
If the `path` exists within your AWS SSM parameter store, the configuration store will read all of the values under that path by calling the AWS API with your default credentials and region.
If the configuration store cannot find the `path` or cannot connect to AWS, the configuration retrieval fails.
Periodically, AWS is polled to check if the configuration has changed.