Skip to content

Commit e8da972

Browse files
Merge branch 'main' into fix/issue1212
2 parents c56ba6e + a164bca commit e8da972

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+18144
-9442
lines changed

.github/component_owners.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ components:
33
libs/hooks/open-telemetry:
44
- beeme1mr
55
- toddbaert
6+
libs/providers/aws-ssm:
7+
- gdegiorgio
68
libs/providers/config-cat:
79
- lukas-reining
810
- adams85

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
- run: git branch --track main origin/main || true
3232

3333
- run: if ! npx nx format:check ; then echo "Format check failed. Please run 'npx nx format:write'."; fi
34-
- run: npx nx affected --target=lint --parallel=3
35-
- run: npx nx affected --target=test --parallel=3 --ci --code-coverage
36-
- run: npx nx affected --target=build --parallel=3
34+
- run: npx nx affected --target=lint --parallel=3 --exclude=js-sdk-contrib
35+
- run: npx nx affected --target=test --parallel=3 --ci --code-coverage --exclude=js-sdk-contrib
36+
- run: npx nx affected --target=build --parallel=3 --exclude=js-sdk-contrib
3737

3838
e2e:
3939
runs-on: ubuntu-latest

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ proto
4646
# yalc stuff
4747
.yalc
4848
yalc.lock
49+
50+
51+
# Generated by @nx/js
52+
.verdaccio

.release-please-manifest.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"libs/hooks/open-telemetry": "0.4.0",
33
"libs/providers/go-feature-flag": "0.7.6",
44
"libs/providers/flagd": "0.13.3",
5-
"libs/providers/flagd-web": "0.7.2",
5+
"libs/providers/flagd-web": "0.7.3",
66
"libs/providers/env-var": "0.3.1",
77
"libs/providers/config-cat": "0.7.4",
88
"libs/providers/launchdarkly-client": "0.3.2",
@@ -12,13 +12,14 @@
1212
"libs/providers/ofrep": "0.2.1",
1313
"libs/providers/ofrep-web": "0.3.2",
1414
"libs/providers/flipt": "0.1.2",
15-
"libs/providers/flagsmith-client": "0.1.2",
15+
"libs/providers/flagsmith-client": "0.1.3",
1616
"libs/providers/flipt-web": "0.1.2",
1717
"libs/providers/multi-provider": "0.1.2",
1818
"libs/providers/multi-provider-web": "0.0.3",
1919
"libs/providers/growthbook-client": "0.1.2",
2020
"libs/providers/config-cat-web": "0.1.5",
2121
"libs/shared/config-cat-core": "0.1.1",
2222
"libs/providers/unleash-web": "0.1.1",
23-
"libs/providers/growthbook": "0.1.2"
23+
"libs/providers/growthbook": "0.1.2",
24+
"libs/providers/aws-ssm": "0.1.2"
2425
}

assets/aws-ssm/create-param.png

106 KB
Loading

assets/aws-ssm/search.png

14.2 KB
Loading

assets/aws-ssm/ssm-menu.png

54.3 KB
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"extends": ["../../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": [
22+
"error",
23+
{
24+
"ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"]
25+
}
26+
]
27+
}
28+
}
29+
]
30+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## [0.1.2](https://github.com/open-feature/js-sdk-contrib/compare/aws-ssm-provider-v0.1.1...aws-ssm-provider-v0.1.2) (2025-03-27)
4+
5+
6+
### ✨ New Features
7+
8+
* **aws-ssm:** add decryption support for `SecureString` parameters ([#1241](https://github.com/open-feature/js-sdk-contrib/issues/1241)) ([043be44](https://github.com/open-feature/js-sdk-contrib/commit/043be44de1442b89876e9857478afe619fcf0b04))
9+
10+
## [0.1.1](https://github.com/open-feature/js-sdk-contrib/compare/aws-ssm-provider-v0.1.0...aws-ssm-provider-v0.1.1) (2025-03-20)
11+
12+
13+
### ✨ New Features
14+
15+
* **aws-ssm:** implement AWS SSM provider ([#1221](https://github.com/open-feature/js-sdk-contrib/issues/1221)) ([819a247](https://github.com/open-feature/js-sdk-contrib/commit/819a247c41112c2873aa025ac0abd3c62eb53aca))

libs/providers/aws-ssm/README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# AWS SSM Provider
2+
3+
## What is AWS SSM?
4+
AWS Systems Manager (SSM) is a service provided by Amazon Web Services (AWS) that enables users to manage and automate operational tasks across their AWS infrastructure. One of its key components is AWS Systems Manager Parameter Store, which allows users to store, retrieve, and manage configuration data and secrets securely.
5+
SSM Parameter Store can be used to manage application configuration settings, database connection strings, API keys, and other sensitive information. It provides integration with AWS Identity and Access Management (IAM) to control access and encryption through AWS Key Management Service (KMS).
6+
The aws-ssm provider for OpenFeature allows applications to fetch feature flag configurations from AWS SSM Parameter Store, enabling centralized and dynamic configuration management.
7+
8+
## Installation
9+
10+
```
11+
$ npm install @openfeature/aws-ssm-provider
12+
```
13+
14+
## Set AWS Provider
15+
16+
```
17+
OpenFeature.setProvider(
18+
new AwsSsmProvider({
19+
ssmClientConfig: {
20+
region: 'eu-west-1', // Change this to your desired AWS region
21+
// You can setup your aws credentials here or it will be automatically retrieved from env vars
22+
// See https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
23+
},
24+
// Use an LRUCache for improve performance and optimize AWS SDK Calls to SSM (cost awareness)
25+
cacheOpts: {
26+
enabled: true, // Enable caching
27+
size: 1, // Cache size
28+
ttl: 10, // Time-to-live in seconds
29+
},
30+
})
31+
);
32+
```
33+
34+
# AWS SSM Provider Configuration
35+
36+
## AwsSsmProviderConfig
37+
38+
| Property | Type | Description | Default |
39+
|-----------------|--------------------|----------------------------------------------|---------|
40+
| `ssmClientConfig` | `SSMClientConfig` | AWS SSM Client configuration options. | See [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm/) |
41+
| `enableDecryption` | `boolean` | Enable decryption for SecureString parameters | false |
42+
| `cacheOpts` | `LRUCacheConfig` | Configuration for the local LRU cache. | See below |
43+
44+
## LRUCacheConfig
45+
46+
| Property | Type | Description | Default |
47+
|-----------|--------|------------------------------------------------|---------|
48+
| `enabled` | `boolean` | Whether caching is enabled. | `false` |
49+
| `ttl` | `number` | Time-to-live (TTL) for cached items (in ms). | `300000` (5 minutes) |
50+
| `size` | `number` | Maximum number of items in the cache. | `1000` |
51+
52+
53+
54+
55+
## Retrieve Feature Flag!
56+
57+
Open your AWS Management Console and go to AWS System Manager service
58+
59+
![SSM-Menu](../../../assets/aws-ssm/search.png)
60+
61+
Go to Parameter Store
62+
63+
![Parameter-Store](../../../assets/aws-ssm/ssm-menu.png)
64+
65+
Create a new SSM Param called 'my-feature-flag' in your AWS Account and then retrieve it via OpenFeature Client!
66+
67+
![Create-Param](../../../assets/aws-ssm/create-param.png)
68+
69+
```
70+
const featureFlags = OpenFeature.getClient();
71+
const flagValue = await featureFlags.getBooleanValue('my-feature-flag', false);
72+
console.log(`Feature flag value: ${flagValue}`);
73+
```

0 commit comments

Comments
 (0)