ac-awssecrets 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/index.js +1 -8
  3. package/package.json +3 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ <a name="2.0.1"></a>
2
+
3
+ ## [2.0.1](https://github.com/admiralcloud/ac-awssecrets/compare/v2.0.0..v2.0.1) (2023-05-12 16:00:19)
4
+
5
+
6
+ ### Bug Fix
7
+
8
+ * **App:** Use AWS_PROFILE instead of profile | MP | [5b0c1ce8413d22a88de870ff46c080019c2d795e](https://github.com/admiralcloud/ac-awssecrets/commit/5b0c1ce8413d22a88de870ff46c080019c2d795e)
9
+ Use AWS_PROFILE and the built-in session management from AWS SDK
10
+ Related issues: [/issues#undefined](https://github.com//issues/undefined)
1
11
  <a name="2.0.0"></a>
2
12
 
3
13
  # [2.0.0](https://github.com/admiralcloud/ac-awssecrets/compare/v1.1.6..v2.0.0) (2023-02-26 11:45:48)
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const { SecretsManagerClient, GetSecretValueCommand } = require("@aws-sdk/client-secrets-manager");
2
- const { fromIni } = require("@aws-sdk/credential-providers")
3
2
 
4
3
  const testConfig = require('./test/config')
5
4
 
@@ -32,18 +31,12 @@ const awsSecrets = () => {
32
31
 
33
32
 
34
33
  const functionName = 'ac-awsSecrets'.padEnd(15)
35
- const loadSecrets = async({ secrets = [], multisecrets = [], config = {}, profile = process.env['profile'], testMode = 0, debug = false } = {}) => {
34
+ const loadSecrets = async({ secrets = [], multisecrets = [], config = {}, testMode = 0, debug = false } = {}) => {
36
35
  const environment = config?.environment || 'development'
37
36
 
38
37
  const awsConfig = {
39
38
  region: 'eu-central-1'
40
39
  }
41
- // credentials are determined from Lambda role.
42
- // But you can also use a set profile
43
- if (profile) {
44
- console.error('%s | Using AWS profile | %s', functionName, profile)
45
- awsConfig.credentials = fromIni({ profile })
46
- }
47
40
  const client = new SecretsManagerClient(awsConfig)
48
41
 
49
42
 
package/package.json CHANGED
@@ -3,13 +3,12 @@
3
3
  "author": "Mark Poepping (https://www.admiralcloud.com)",
4
4
  "license": "MIT",
5
5
  "repository": "admiralcloud/ac-awssecrets",
6
- "version": "2.0.0",
6
+ "version": "2.0.1",
7
7
  "dependencies": {
8
- "@aws-sdk/client-secrets-manager": "^3.279.0",
9
- "@aws-sdk/credential-providers": "^3.279.0"
8
+ "@aws-sdk/client-secrets-manager": "^3.332.0"
10
9
  },
11
10
  "devDependencies": {
12
- "ac-semantic-release": "^0.3.5",
11
+ "ac-semantic-release": "^0.4.1",
13
12
  "chai": "^4.3.7",
14
13
  "eslint": "8.x",
15
14
  "mocha": "^10.2.0",