@cumulus/aws-client 18.2.0-alpha.0 → 18.2.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.
@@ -9,7 +9,7 @@
9
9
  * @param {string} StackName - The name of the CloudFormation stack to query
10
10
  * @returns {Promise<CloudFormation.Stack>} The resources belonging to the stack
11
11
  */
12
- export declare const describeCfStack: (StackName: string) => Promise<import("aws-sdk/clients/cloudformation").Stack>;
12
+ export declare const describeCfStack: (StackName: string) => Promise<import("@aws-sdk/client-cloudformation").Stack>;
13
13
  /**
14
14
  * Describes the resources belonging to a given CloudFormation stack
15
15
  *
@@ -18,7 +18,7 @@ export declare const describeCfStack: (StackName: string) => Promise<import("aws
18
18
  * @param {string} StackName - The name of the CloudFormation stack to query
19
19
  * @returns {Promise<CloudFormation.StackResources>} The resources belonging to the stack
20
20
  */
21
- export declare const describeCfStackResources: (StackName: string) => Promise<import("aws-sdk/clients/cloudformation").StackResources | undefined>;
21
+ export declare const describeCfStackResources: (StackName: string) => Promise<import("@aws-sdk/client-cloudformation").StackResource[] | undefined>;
22
22
  /**
23
23
  * Get parameter values for the given CloudFormation stack
24
24
  *
package/CloudFormation.js CHANGED
@@ -18,7 +18,7 @@ const services_1 = require("./services");
18
18
  * @returns {Promise<CloudFormation.Stack>} The resources belonging to the stack
19
19
  */
20
20
  const describeCfStack = async (StackName) => {
21
- const response = await (0, services_1.cf)().describeStacks({ StackName }).promise();
21
+ const response = await (0, services_1.cf)().describeStacks({ StackName });
22
22
  if (response.Stacks)
23
23
  return response.Stacks[0];
24
24
  throw new Error(`Stack not found: ${StackName}`);
@@ -33,7 +33,7 @@ exports.describeCfStack = describeCfStack;
33
33
  * @returns {Promise<CloudFormation.StackResources>} The resources belonging to the stack
34
34
  */
35
35
  const describeCfStackResources = async (StackName) => {
36
- const response = await (0, services_1.cf)().describeStackResources({ StackName }).promise();
36
+ const response = await (0, services_1.cf)().describeStackResources({ StackName });
37
37
  return response.StackResources;
38
38
  };
39
39
  exports.describeCfStackResources = describeCfStackResources;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @module CloudwatchEvents
3
3
  */
4
+ import { RuleState } from '@aws-sdk/client-cloudwatch-events';
4
5
  /**
5
6
  * Create a CloudWatch Events rule
6
7
  *
@@ -11,10 +12,8 @@
11
12
  * @param {string} [role] - a Role ARN
12
13
  * @returns {Promise<CloudWatchEvents.PutRuleResponse>}
13
14
  */
14
- export declare const putEvent: (name: string, schedule: string, state: string, description?: string, role?: string) => Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/cloudwatchevents").PutRuleResponse, import("aws-sdk").AWSError>>;
15
- export declare const deleteEvent: (name: string) => Promise<{
16
- $response: import("aws-sdk").Response<{}, import("aws-sdk").AWSError>;
17
- }>;
18
- export declare const deleteTarget: (id: string, rule: string) => Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/cloudwatchevents").RemoveTargetsResponse, import("aws-sdk").AWSError>>;
19
- export declare const putTarget: (rule: string, id: string, arn: string, input: string) => Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/cloudwatchevents").PutTargetsResponse, import("aws-sdk").AWSError>>;
15
+ export declare const putEvent: (name: string, schedule: string, state: RuleState, description?: string, role?: string) => Promise<import("@aws-sdk/client-cloudwatch-events").PutRuleCommandOutput>;
16
+ export declare const deleteEvent: (name: string) => Promise<import("@aws-sdk/client-cloudwatch-events").DeleteRuleCommandOutput>;
17
+ export declare const deleteTarget: (id: string, rule: string) => Promise<import("@aws-sdk/client-cloudwatch-events").RemoveTargetsCommandOutput>;
18
+ export declare const putTarget: (rule: string, id: string, arn: string, input: string) => Promise<import("@aws-sdk/client-cloudwatch-events").PutTargetsCommandOutput>;
20
19
  //# sourceMappingURL=CloudwatchEvents.d.ts.map
@@ -21,14 +21,14 @@ const putEvent = (name, schedule, state, description, role) => (0, services_1.cl
21
21
  RoleArn: role,
22
22
  ScheduleExpression: schedule,
23
23
  State: state,
24
- }).promise();
24
+ });
25
25
  exports.putEvent = putEvent;
26
- const deleteEvent = (name) => (0, services_1.cloudwatchevents)().deleteRule({ Name: name }).promise();
26
+ const deleteEvent = (name) => (0, services_1.cloudwatchevents)().deleteRule({ Name: name });
27
27
  exports.deleteEvent = deleteEvent;
28
28
  const deleteTarget = (id, rule) => (0, services_1.cloudwatchevents)().removeTargets({
29
29
  Ids: [id],
30
30
  Rule: rule,
31
- }).promise();
31
+ });
32
32
  exports.deleteTarget = deleteTarget;
33
33
  const putTarget = (rule, id, arn, input) => (0, services_1.cloudwatchevents)().putTargets({
34
34
  Rule: rule,
@@ -39,6 +39,6 @@ const putTarget = (rule, id, arn, input) => (0, services_1.cloudwatchevents)().p
39
39
  Input: input,
40
40
  },
41
41
  ],
42
- }).promise();
42
+ });
43
43
  exports.putTarget = putTarget;
44
44
  //# sourceMappingURL=CloudwatchEvents.js.map
package/KMS.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @module KMS
3
3
  */
4
+ import { CreateKeyCommandInput } from '@aws-sdk/client-kms';
4
5
  /**
5
6
  * Create a KMS key
6
7
  *
@@ -10,7 +11,7 @@
10
11
  * @param {Object} params
11
12
  * @returns {Promise<Object>}
12
13
  */
13
- export declare const createKey: (params?: AWS.KMS.CreateKeyRequest) => Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/kms").CreateKeyResponse, import("aws-sdk").AWSError>>;
14
+ export declare const createKey: (params?: CreateKeyCommandInput) => Promise<import("@aws-sdk/client-kms").CreateKeyCommandOutput>;
14
15
  /**
15
16
  * Encrypt a string using KMS
16
17
  *
package/KMS.js CHANGED
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * @module KMS
4
- */
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.decryptBase64String = exports.encrypt = exports.createKey = void 0;
7
4
  const services_1 = require("./services");
@@ -14,7 +11,7 @@ const services_1 = require("./services");
14
11
  * @param {Object} params
15
12
  * @returns {Promise<Object>}
16
13
  */
17
- const createKey = (params = {}) => (0, services_1.kms)().createKey(params).promise();
14
+ const createKey = (params = {}) => (0, services_1.kms)().createKey(params);
18
15
  exports.createKey = createKey;
19
16
  /**
20
17
  * Encrypt a string using KMS
@@ -24,10 +21,11 @@ exports.createKey = createKey;
24
21
  * @returns {Promise<string>} the Base 64 encoding of the encrypted value
25
22
  */
26
23
  const encrypt = async (KeyId, Plaintext) => {
27
- const { CiphertextBlob } = await (0, services_1.kms)().encrypt({ KeyId, Plaintext }).promise();
24
+ const { CiphertextBlob } = await (0, services_1.kms)().encrypt({ KeyId,
25
+ Plaintext: new TextEncoder().encode(Plaintext) });
28
26
  if (CiphertextBlob === undefined)
29
27
  throw new Error('Returned CiphertextBlob is undefined');
30
- return CiphertextBlob.toString('base64');
28
+ return Buffer.from(CiphertextBlob).toString('base64');
31
29
  };
32
30
  exports.encrypt = encrypt;
33
31
  /**
@@ -39,10 +37,10 @@ exports.encrypt = encrypt;
39
37
  const decryptBase64String = async (ciphertext) => {
40
38
  const { Plaintext } = await (0, services_1.kms)().decrypt({
41
39
  CiphertextBlob: Buffer.from(ciphertext, 'base64'),
42
- }).promise();
40
+ });
43
41
  if (Plaintext === undefined)
44
42
  return undefined;
45
- return Plaintext.toString();
43
+ return Buffer.from(Plaintext).toString();
46
44
  };
47
45
  exports.decryptBase64String = decryptBase64String;
48
46
  //# sourceMappingURL=KMS.js.map
package/Kinesis.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * @module Kinesis
3
3
  */
4
4
  import pRetry from 'p-retry';
5
+ import { DescribeStreamInput } from '@aws-sdk/client-kinesis';
5
6
  /**
6
7
  * Describe a Kinesis stream.
7
8
  *
@@ -10,5 +11,5 @@ import pRetry from 'p-retry';
10
11
  * @param {Object} retryOptions - Options passed to p-retry module
11
12
  * @returns {Promise<Object>} The stream description response
12
13
  */
13
- export declare const describeStream: (params: AWS.Kinesis.DescribeStreamInput, retryOptions?: pRetry.Options) => Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/kinesis").DescribeStreamOutput, import("aws-sdk").AWSError>>;
14
+ export declare const describeStream: (params: DescribeStreamInput, retryOptions?: pRetry.Options) => Promise<import("@aws-sdk/client-kinesis").DescribeStreamCommandOutput>;
14
15
  //# sourceMappingURL=Kinesis.d.ts.map
package/Kinesis.js CHANGED
@@ -8,6 +8,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.describeStream = void 0;
10
10
  const p_retry_1 = __importDefault(require("p-retry"));
11
+ const client_kinesis_1 = require("@aws-sdk/client-kinesis");
11
12
  const services_1 = require("./services");
12
13
  /**
13
14
  * Describe a Kinesis stream.
@@ -19,10 +20,10 @@ const services_1 = require("./services");
19
20
  */
20
21
  const describeStream = (params, retryOptions = { retries: 0 }) => (0, p_retry_1.default)(async () => {
21
22
  try {
22
- return await (0, services_1.kinesis)().describeStream(params).promise();
23
+ return await (0, services_1.kinesis)().describeStream(params);
23
24
  }
24
25
  catch (error) {
25
- if (error.code === 'ResourceNotFoundException')
26
+ if (error instanceof client_kinesis_1.ResourceNotFoundException)
26
27
  throw error;
27
28
  throw new p_retry_1.default.AbortError(error);
28
29
  }
package/README.md CHANGED
@@ -35,18 +35,16 @@ NODE_ENV=test
35
35
  <dd></dd>
36
36
  <dt><a href="#module_DynamoDb">DynamoDb</a></dt>
37
37
  <dd></dd>
38
- <dt><a href="#module_KMS">KMS</a></dt>
39
- <dd></dd>
40
38
  <dt><a href="#module_Kinesis">Kinesis</a></dt>
41
39
  <dd></dd>
42
- <dt><a href="#module_Lambda">Lambda</a></dt>
43
- <dd></dd>
44
40
  <dt><a href="#module_S3">S3</a></dt>
45
41
  <dd></dd>
46
42
  <dt><a href="#module_SNS">SNS</a></dt>
47
43
  <dd></dd>
48
44
  <dt><a href="#module_SQS">SQS</a></dt>
49
45
  <dd></dd>
46
+ <dt><a href="#module_STS">STS</a></dt>
47
+ <dd></dd>
50
48
  <dt><a href="#module_SecretsManager">SecretsManager</a></dt>
51
49
  <dd></dd>
52
50
  <dt><a href="#module_StepFunctions">StepFunctions</a></dt>
@@ -69,6 +67,22 @@ them all into memory at once. Handles paging of listS3ObjectsV2 requests.</p>
69
67
  </dd>
70
68
  </dl>
71
69
 
70
+ ## Functions
71
+
72
+ <dl>
73
+ <dt><a href="#createKey">createKey(params)</a> ⇒ <code>Promise.&lt;Object&gt;</code></dt>
74
+ <dd><p>Create a KMS key</p>
75
+ <p>See <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property">https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property</a>
76
+ for allowed params and return value.</p>
77
+ </dd>
78
+ <dt><a href="#encrypt">encrypt(KeyId, Plaintext)</a> ⇒ <code>Promise.&lt;string&gt;</code></dt>
79
+ <dd><p>Encrypt a string using KMS</p>
80
+ </dd>
81
+ <dt><a href="#decryptBase64String">decryptBase64String(ciphertext)</a> ⇒ <code>string</code></dt>
82
+ <dd><p>Decrypt a KMS-encrypted string, Base 64 encoded</p>
83
+ </dd>
84
+ </dl>
85
+
72
86
  <a name="module_CloudFormation"></a>
73
87
 
74
88
  ## CloudFormation
@@ -228,54 +242,6 @@ See [DocumentClient.scan()](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/late
228
242
  | [params.dynamoDbClient] | <code>DynamoDBDocument</code> | Instance of Dynamo DB document client |
229
243
  | [params.retryOptions] | <code>pRetry.Options</code> | Retry options for scan operations |
230
244
 
231
- <a name="module_KMS"></a>
232
-
233
- ## KMS
234
-
235
- * [KMS](#module_KMS)
236
- * [~createKey(params)](#module_KMS..createKey) ⇒ <code>Promise.&lt;Object&gt;</code>
237
- * [~encrypt(KeyId, Plaintext)](#module_KMS..encrypt) ⇒ <code>Promise.&lt;string&gt;</code>
238
- * [~decryptBase64String(ciphertext)](#module_KMS..decryptBase64String) ⇒ <code>string</code>
239
-
240
- <a name="module_KMS..createKey"></a>
241
-
242
- ### KMS~createKey(params) ⇒ <code>Promise.&lt;Object&gt;</code>
243
- Create a KMS key
244
-
245
- See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property
246
- for allowed params and return value.
247
-
248
- **Kind**: inner method of [<code>KMS</code>](#module_KMS)
249
-
250
- | Param | Type |
251
- | --- | --- |
252
- | params | <code>Object</code> |
253
-
254
- <a name="module_KMS..encrypt"></a>
255
-
256
- ### KMS~encrypt(KeyId, Plaintext) ⇒ <code>Promise.&lt;string&gt;</code>
257
- Encrypt a string using KMS
258
-
259
- **Kind**: inner method of [<code>KMS</code>](#module_KMS)
260
- **Returns**: <code>Promise.&lt;string&gt;</code> - the Base 64 encoding of the encrypted value
261
-
262
- | Param | Type | Description |
263
- | --- | --- | --- |
264
- | KeyId | <code>string</code> | the KMS key to use for encryption |
265
- | Plaintext | <code>string</code> | the string to be encrypted |
266
-
267
- <a name="module_KMS..decryptBase64String"></a>
268
-
269
- ### KMS~decryptBase64String(ciphertext) ⇒ <code>string</code>
270
- Decrypt a KMS-encrypted string, Base 64 encoded
271
-
272
- **Kind**: inner method of [<code>KMS</code>](#module_KMS)
273
- **Returns**: <code>string</code> - the plaintext
274
-
275
- | Param | Type | Description |
276
- | --- | --- | --- |
277
- | ciphertext | <code>string</code> | a KMS-encrypted value, Base 64 encoded |
278
-
279
245
  <a name="module_Kinesis"></a>
280
246
 
281
247
  ## Kinesis
@@ -293,22 +259,6 @@ Describe a Kinesis stream.
293
259
  | params.StreamName | <code>string</code> | A Kinesis stream name |
294
260
  | retryOptions | <code>Object</code> | Options passed to p-retry module |
295
261
 
296
- <a name="module_Lambda"></a>
297
-
298
- ## Lambda
299
- <a name="module_Lambda.invoke"></a>
300
-
301
- ### Lambda.invoke(name, payload, type) ⇒ <code>Promise.&lt;InvokeCommandOutput&gt;</code>
302
- Invoke a Lambda function
303
-
304
- **Kind**: static method of [<code>Lambda</code>](#module_Lambda)
305
-
306
- | Param | Type | Default | Description |
307
- | --- | --- | --- | --- |
308
- | name | <code>string</code> | | Lambda function name |
309
- | payload | <code>any</code> | | the payload to the Lambda function |
310
- | type | <code>string</code> | <code>&quot;Event&quot;</code> | the invocation type |
311
-
312
262
  <a name="module_S3"></a>
313
263
 
314
264
  ## S3
@@ -912,51 +862,38 @@ errors, to allow more specific handling by the caller.
912
862
 
913
863
  * [SQS](#module_SQS)
914
864
  * _static_
915
- * [.sendSQSMessage](#module_SQS.sendSQSMessage) ⇒ <code>Promise</code>
916
- * [.deleteSQSMessage](#module_SQS.deleteSQSMessage) ⇒ <code>Promise</code>
917
865
  * [.createQueue(QueueName)](#module_SQS.createQueue) ⇒ <code>Promise.&lt;string&gt;</code>
918
866
  * _inner_
867
+ * [~sendSQSMessage(queueUrl, message, [logOverride])](#module_SQS..sendSQSMessage) ⇒ <code>Promise</code>
919
868
  * [~receiveSQSMessages(queueUrl, options)](#module_SQS..receiveSQSMessages) ⇒ <code>Promise.&lt;Array&gt;</code>
869
+ * [~deleteSQSMessage(queueUrl, receiptHandle)](#module_SQS..deleteSQSMessage) ⇒ <code>Promise</code>
920
870
  * [~sqsQueueExists(queueUrl)](#module_SQS..sqsQueueExists) ⇒ <code>Promise.&lt;boolean&gt;</code>
921
871
 
922
- <a name="module_SQS.sendSQSMessage"></a>
872
+ <a name="module_SQS.createQueue"></a>
923
873
 
924
- ### SQS.sendSQSMessage ⇒ <code>Promise</code>
925
- Send a message to AWS SQS
874
+ ### SQS.createQueue(QueueName) ⇒ <code>Promise.&lt;string&gt;</code>
875
+ Create an SQS Queue. Properly handles localstack queue URLs
926
876
 
927
- **Kind**: static property of [<code>SQS</code>](#module_SQS)
928
- **Returns**: <code>Promise</code> - resolves when the messsage has been sent
877
+ **Kind**: static method of [<code>SQS</code>](#module_SQS)
878
+ **Returns**: <code>Promise.&lt;string&gt;</code> - the Queue URL
929
879
 
930
880
  | Param | Type | Description |
931
881
  | --- | --- | --- |
932
- | queueUrl | <code>string</code> | url of the SQS queue |
933
- | message | <code>string</code> \| <code>Object</code> | either string or object message. If an object it will be serialized into a JSON string. |
934
- | [logOverride] | <code>Logger</code> | optional Logger passed in for testing |
882
+ | QueueName | <code>string</code> | queue name |
935
883
 
936
- <a name="module_SQS.deleteSQSMessage"></a>
884
+ <a name="module_SQS..sendSQSMessage"></a>
937
885
 
938
- ### SQS.deleteSQSMessage ⇒ <code>Promise</code>
939
- Delete a given SQS message from a given queue.
886
+ ### SQS~sendSQSMessage(queueUrl, message, [logOverride]) ⇒ <code>Promise</code>
887
+ Send a message to AWS SQS
940
888
 
941
- **Kind**: static property of [<code>SQS</code>](#module_SQS)
942
- **Returns**: <code>Promise</code> - an AWS SQS response
889
+ **Kind**: inner method of [<code>SQS</code>](#module_SQS)
890
+ **Returns**: <code>Promise</code> - resolves when the messsage has been sent
943
891
 
944
892
  | Param | Type | Description |
945
893
  | --- | --- | --- |
946
894
  | queueUrl | <code>string</code> | url of the SQS queue |
947
- | receiptHandle | <code>integer</code> | the unique identifier of the sQS message |
948
-
949
- <a name="module_SQS.createQueue"></a>
950
-
951
- ### SQS.createQueue(QueueName) ⇒ <code>Promise.&lt;string&gt;</code>
952
- Create an SQS Queue. Properly handles localstack queue URLs
953
-
954
- **Kind**: static method of [<code>SQS</code>](#module_SQS)
955
- **Returns**: <code>Promise.&lt;string&gt;</code> - the Queue URL
956
-
957
- | Param | Type | Description |
958
- | --- | --- | --- |
959
- | QueueName | <code>string</code> | queue name |
895
+ | message | <code>string</code> \| <code>Object</code> | either string or object message. If an object it will be serialized into a JSON string. |
896
+ | [logOverride] | <code>Logger</code> | optional Logger passed in for testing |
960
897
 
961
898
  <a name="module_SQS..receiveSQSMessages"></a>
962
899
 
@@ -975,6 +912,19 @@ can be set and the timeout is also adjustable.
975
912
  | [options.visibilityTimeout] | <code>integer</code> | <code>30</code> | number of seconds a message is invisible after read |
976
913
  | [options.waitTimeSeconds] | <code>integer</code> | <code>0</code> | number of seconds to poll SQS queue (long polling) |
977
914
 
915
+ <a name="module_SQS..deleteSQSMessage"></a>
916
+
917
+ ### SQS~deleteSQSMessage(queueUrl, receiptHandle) ⇒ <code>Promise</code>
918
+ Delete a given SQS message from a given queue.
919
+
920
+ **Kind**: inner method of [<code>SQS</code>](#module_SQS)
921
+ **Returns**: <code>Promise</code> - an AWS SQS response
922
+
923
+ | Param | Type | Description |
924
+ | --- | --- | --- |
925
+ | queueUrl | <code>string</code> | url of the SQS queue |
926
+ | receiptHandle | <code>integer</code> | the unique identifier of the sQS message |
927
+
978
928
  <a name="module_SQS..sqsQueueExists"></a>
979
929
 
980
930
  ### SQS~sqsQueueExists(queueUrl) ⇒ <code>Promise.&lt;boolean&gt;</code>
@@ -988,6 +938,9 @@ Test if an SQS queue exists
988
938
  | --- | --- | --- |
989
939
  | queueUrl | <code>Object</code> | queue url |
990
940
 
941
+ <a name="module_STS"></a>
942
+
943
+ ## STS
991
944
  <a name="module_SecretsManager"></a>
992
945
 
993
946
  ## SecretsManager
@@ -1208,6 +1161,45 @@ store URL
1208
1161
  | [queryParams] | <code>string</code> | a mapping of parameter key/values to put in the URL |
1209
1162
  | presignOptions | <code>RequestPresigningArguments</code> | presignOptions |
1210
1163
 
1164
+ <a name="createKey"></a>
1165
+
1166
+ ## createKey(params) ⇒ <code>Promise.&lt;Object&gt;</code>
1167
+ Create a KMS key
1168
+
1169
+ See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property
1170
+ for allowed params and return value.
1171
+
1172
+ **Kind**: global function
1173
+
1174
+ | Param | Type |
1175
+ | --- | --- |
1176
+ | params | <code>Object</code> |
1177
+
1178
+ <a name="encrypt"></a>
1179
+
1180
+ ## encrypt(KeyId, Plaintext) ⇒ <code>Promise.&lt;string&gt;</code>
1181
+ Encrypt a string using KMS
1182
+
1183
+ **Kind**: global function
1184
+ **Returns**: <code>Promise.&lt;string&gt;</code> - the Base 64 encoding of the encrypted value
1185
+
1186
+ | Param | Type | Description |
1187
+ | --- | --- | --- |
1188
+ | KeyId | <code>string</code> | the KMS key to use for encryption |
1189
+ | Plaintext | <code>string</code> | the string to be encrypted |
1190
+
1191
+ <a name="decryptBase64String"></a>
1192
+
1193
+ ## decryptBase64String(ciphertext) ⇒ <code>string</code>
1194
+ Decrypt a KMS-encrypted string, Base 64 encoded
1195
+
1196
+ **Kind**: global function
1197
+ **Returns**: <code>string</code> - the plaintext
1198
+
1199
+ | Param | Type | Description |
1200
+ | --- | --- | --- |
1201
+ | ciphertext | <code>string</code> | a KMS-encrypted value, Base 64 encoded |
1202
+
1211
1203
 
1212
1204
  ## About Cumulus
1213
1205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/aws-client",
3
- "version": "18.2.0-alpha.0",
3
+ "version": "18.2.1",
4
4
  "description": "Utilities for working with AWS",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -44,9 +44,13 @@
44
44
  "author": "Cumulus Authors",
45
45
  "license": "Apache-2.0",
46
46
  "dependencies": {
47
- "@aws-sdk/client-api-gateway": "^3.447.0",
47
+ "@aws-sdk/client-api-gateway": "^3.499.0",
48
+ "@aws-sdk/client-cloudformation": "^3.447.0",
49
+ "@aws-sdk/client-cloudwatch-events": "^3.447.0",
48
50
  "@aws-sdk/client-dynamodb": "^3.447.0",
49
51
  "@aws-sdk/client-dynamodb-streams": "^3.447.0",
52
+ "@aws-sdk/client-kinesis": "^3.447.0",
53
+ "@aws-sdk/client-kms": "^3.447.0",
50
54
  "@aws-sdk/client-lambda": "^3.447.0",
51
55
  "@aws-sdk/client-s3": "^3.447.0",
52
56
  "@aws-sdk/client-sns": "^3.447.0",
@@ -56,9 +60,9 @@
56
60
  "@aws-sdk/s3-request-presigner": "^3.447.0",
57
61
  "@aws-sdk/signature-v4-crt": "^3.447.0",
58
62
  "@aws-sdk/types": "^3.447.0",
59
- "@cumulus/checksum": "18.2.0-alpha.0",
60
- "@cumulus/errors": "18.2.0-alpha.0",
61
- "@cumulus/logger": "18.2.0-alpha.0",
63
+ "@cumulus/checksum": "18.2.1",
64
+ "@cumulus/errors": "18.2.1",
65
+ "@cumulus/logger": "18.2.1",
62
66
  "aws-sdk": "^2.1492.0",
63
67
  "jsonpath-plus": "^1.1.0",
64
68
  "lodash": "~4.17.21",
@@ -71,8 +75,8 @@
71
75
  "uuid": "^8.2.0"
72
76
  },
73
77
  "devDependencies": {
74
- "@cumulus/test-data": "18.2.0-alpha.0",
78
+ "@cumulus/test-data": "18.0.0",
75
79
  "@types/uuid": "^8.0.0"
76
80
  },
77
- "gitHead": "bad58942a6b271b19587c9a41c09ff8ebd1b1c39"
81
+ "gitHead": "be885e09333228fd5b42ae2319783b557422cbf8"
78
82
  }
package/services.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import { APIGatewayClient } from '@aws-sdk/client-api-gateway';
2
+ import { CloudFormation } from '@aws-sdk/client-cloudformation';
2
3
  import { DynamoDB } from '@aws-sdk/client-dynamodb';
3
4
  import { DynamoDBStreamsClient } from '@aws-sdk/client-dynamodb-streams';
5
+ import { Kinesis } from '@aws-sdk/client-kinesis';
6
+ import { KMS } from '@aws-sdk/client-kms';
4
7
  import { Lambda } from '@aws-sdk/client-lambda';
8
+ import { CloudWatchEvents } from '@aws-sdk/client-cloudwatch-events';
5
9
  import { S3 } from '@aws-sdk/client-s3';
6
10
  import { SQS } from '@aws-sdk/client-sqs';
7
11
  import { DynamoDBDocument, TranslateConfig } from '@aws-sdk/lib-dynamodb';
@@ -11,21 +15,21 @@ export declare const apigateway: (params?: object | undefined) => APIGatewayClie
11
15
  export declare const ecs: (params?: object | undefined) => AWS.ECS;
12
16
  export declare const ec2: (params?: object | undefined) => AWS.EC2;
13
17
  export declare const s3: (params?: object | undefined) => S3;
14
- export declare const kinesis: (params?: object | undefined) => AWS.Kinesis;
18
+ export declare const kinesis: (params?: object | undefined) => Kinesis;
15
19
  export declare const lambda: (params?: object | undefined) => Lambda;
20
+ export declare const cloudwatchevents: (params?: object | undefined) => CloudWatchEvents;
16
21
  export declare const sqs: (params?: object | undefined) => SQS;
17
- export declare const cloudwatchevents: (params?: object | undefined) => AWS.CloudWatchEvents;
18
22
  export declare const cloudwatchlogs: (params?: object | undefined) => AWS.CloudWatchLogs;
19
23
  export declare const cloudwatch: (params?: object | undefined) => AWS.CloudWatch;
20
24
  export declare const dynamodb: (params?: object | undefined) => DynamoDB;
21
25
  export declare const dynamodbstreams: (params?: object | undefined) => DynamoDBStreamsClient;
22
26
  export declare const dynamodbDocClient: (docClientOptions?: TranslateConfig, dynamoOptions?: object) => DynamoDBDocument;
23
27
  export declare const sfn: (params?: object | undefined) => AWS.StepFunctions;
24
- export declare const cf: (params?: object | undefined) => AWS.CloudFormation;
28
+ export declare const cf: (params?: object | undefined) => CloudFormation;
25
29
  export declare const sns: (params?: object | undefined) => SNS;
26
30
  export declare const secretsManager: (params?: object | undefined) => AWS.SecretsManager;
27
31
  export declare const systemsManager: (params?: object | undefined) => AWS.SSM;
28
- export declare const kms: (params?: object | undefined) => AWS.KMS;
32
+ export declare const kms: (params?: object | undefined) => KMS;
29
33
  export declare const es: (params?: object | undefined) => AWS.ES;
30
34
  export declare const sts: (params?: object | undefined) => AWS.STS;
31
35
  //# sourceMappingURL=services.d.ts.map
package/services.js CHANGED
@@ -26,11 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.sts = exports.es = exports.kms = exports.systemsManager = exports.secretsManager = exports.sns = exports.cf = exports.sfn = exports.dynamodbDocClient = exports.dynamodbstreams = exports.dynamodb = exports.cloudwatch = exports.cloudwatchlogs = exports.cloudwatchevents = exports.sqs = exports.lambda = exports.kinesis = exports.s3 = exports.ec2 = exports.ecs = exports.apigateway = void 0;
29
+ exports.sts = exports.es = exports.kms = exports.systemsManager = exports.secretsManager = exports.sns = exports.cf = exports.sfn = exports.dynamodbDocClient = exports.dynamodbstreams = exports.dynamodb = exports.cloudwatch = exports.cloudwatchlogs = exports.sqs = exports.cloudwatchevents = exports.lambda = exports.kinesis = exports.s3 = exports.ec2 = exports.ecs = exports.apigateway = void 0;
30
30
  const client_api_gateway_1 = require("@aws-sdk/client-api-gateway");
31
+ const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
31
32
  const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
32
33
  const client_dynamodb_streams_1 = require("@aws-sdk/client-dynamodb-streams");
34
+ const client_kinesis_1 = require("@aws-sdk/client-kinesis");
35
+ const client_kms_1 = require("@aws-sdk/client-kms");
33
36
  const client_lambda_1 = require("@aws-sdk/client-lambda");
37
+ const client_cloudwatch_events_1 = require("@aws-sdk/client-cloudwatch-events");
34
38
  const client_s3_1 = require("@aws-sdk/client-s3");
35
39
  const client_sqs_1 = require("@aws-sdk/client-sqs");
36
40
  const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
@@ -41,10 +45,10 @@ exports.apigateway = (0, client_1.default)(client_api_gateway_1.APIGatewayClient
41
45
  exports.ecs = (0, client_1.default)(AWS.ECS, '2014-11-13');
42
46
  exports.ec2 = (0, client_1.default)(AWS.EC2, '2016-11-15');
43
47
  exports.s3 = (0, client_1.default)(client_s3_1.S3, '2006-03-01');
44
- exports.kinesis = (0, client_1.default)(AWS.Kinesis, '2013-12-02');
48
+ exports.kinesis = (0, client_1.default)(client_kinesis_1.Kinesis, '2013-12-02');
45
49
  exports.lambda = (0, client_1.default)(client_lambda_1.Lambda, '2015-03-31');
50
+ exports.cloudwatchevents = (0, client_1.default)(client_cloudwatch_events_1.CloudWatchEvents, '2015-10-07');
46
51
  exports.sqs = (0, client_1.default)(client_sqs_1.SQS, '2012-11-05');
47
- exports.cloudwatchevents = (0, client_1.default)(AWS.CloudWatchEvents, '2014-02-03');
48
52
  exports.cloudwatchlogs = (0, client_1.default)(AWS.CloudWatchLogs, '2014-03-28');
49
53
  exports.cloudwatch = (0, client_1.default)(AWS.CloudWatch, '2010-08-01');
50
54
  exports.dynamodb = (0, client_1.default)(client_dynamodb_1.DynamoDB, '2012-08-10');
@@ -52,11 +56,11 @@ exports.dynamodbstreams = (0, client_1.default)(client_dynamodb_streams_1.Dynamo
52
56
  const dynamodbDocClient = (docClientOptions, dynamoOptions) => lib_dynamodb_1.DynamoDBDocument.from((0, client_1.default)(client_dynamodb_1.DynamoDB, '2012-08-10')(dynamoOptions), docClientOptions);
53
57
  exports.dynamodbDocClient = dynamodbDocClient;
54
58
  exports.sfn = (0, client_1.default)(AWS.StepFunctions, '2016-11-23');
55
- exports.cf = (0, client_1.default)(AWS.CloudFormation, '2010-05-15');
59
+ exports.cf = (0, client_1.default)(client_cloudformation_1.CloudFormation, '2010-05-15');
56
60
  exports.sns = (0, client_1.default)(client_sns_1.SNS, '2010-03-31');
57
61
  exports.secretsManager = (0, client_1.default)(AWS.SecretsManager, '2017-10-17');
58
62
  exports.systemsManager = (0, client_1.default)(AWS.SSM, '2017-10-17');
59
- exports.kms = (0, client_1.default)(AWS.KMS, '2014-11-01');
63
+ exports.kms = (0, client_1.default)(client_kms_1.KMS, '2014-11-01');
60
64
  exports.es = (0, client_1.default)(AWS.ES, '2015-01-01');
61
65
  exports.sts = (0, client_1.default)(AWS.STS, '2011-06-15');
62
66
  //# sourceMappingURL=services.js.map
package/test-utils.d.ts CHANGED
@@ -4,9 +4,9 @@ export declare const inTestMode: () => boolean;
4
4
  declare const localStackPorts: {
5
5
  stepfunctions: number;
6
6
  APIGatewayClient: number;
7
- cloudformation: number;
7
+ CloudFormation: number;
8
8
  cloudwatch: number;
9
- cloudwatchevents: number;
9
+ CloudWatchEvents: number;
10
10
  cloudwatchlogs: number;
11
11
  DynamoDB: number;
12
12
  DynamoDBClient: number;
@@ -16,8 +16,8 @@ declare const localStackPorts: {
16
16
  es: number;
17
17
  firehose: number;
18
18
  iam: number;
19
- kinesis: number;
20
- kms: number;
19
+ Kinesis: number;
20
+ KMS: number;
21
21
  Lambda: number;
22
22
  redshift: number;
23
23
  route53: number;
package/test-utils.js CHANGED
@@ -9,9 +9,9 @@ exports.inTestMode = inTestMode;
9
9
  const localStackPorts = {
10
10
  stepfunctions: 4566,
11
11
  APIGatewayClient: 4566,
12
- cloudformation: 4566,
12
+ CloudFormation: 4566,
13
13
  cloudwatch: 4566,
14
- cloudwatchevents: 4566,
14
+ CloudWatchEvents: 4566,
15
15
  cloudwatchlogs: 4566,
16
16
  DynamoDB: 4566,
17
17
  DynamoDBClient: 4566,
@@ -21,8 +21,8 @@ const localStackPorts = {
21
21
  es: 4566,
22
22
  firehose: 4566,
23
23
  iam: 4566,
24
- kinesis: 4566,
25
- kms: 4566,
24
+ Kinesis: 4566,
25
+ KMS: 4566,
26
26
  Lambda: 4566,
27
27
  redshift: 4566,
28
28
  route53: 4566,
package/types.d.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  import * as AWS from 'aws-sdk';
2
2
  import { APIGatewayClient } from '@aws-sdk/client-api-gateway';
3
+ import { CloudWatchEvents } from '@aws-sdk/client-cloudwatch-events';
4
+ import { CloudFormation } from '@aws-sdk/client-cloudformation';
3
5
  import { DynamoDBStreamsClient } from '@aws-sdk/client-dynamodb-streams';
4
6
  import { DynamoDB, DynamoDBClient } from '@aws-sdk/client-dynamodb';
7
+ import { Kinesis } from '@aws-sdk/client-kinesis';
8
+ import { KMS } from '@aws-sdk/client-kms';
5
9
  import { Lambda } from '@aws-sdk/client-lambda';
6
10
  import { S3 } from '@aws-sdk/client-s3';
7
11
  import { SNS } from '@aws-sdk/client-sns';
8
12
  import { SQS } from '@aws-sdk/client-sqs';
9
- export declare type AWSClientTypes = APIGatewayClient | DynamoDB | DynamoDBClient | DynamoDBStreamsClient | Lambda | S3 | SNS | SQS | AWS.Service | AWS.DynamoDB.DocumentClient;
13
+ export declare type AWSClientTypes = APIGatewayClient | CloudFormation | CloudWatchEvents | DynamoDB | DynamoDBClient | DynamoDBStreamsClient | KMS | Kinesis | Lambda | S3 | SNS | SQS | AWS.Service | AWS.DynamoDB.DocumentClient;
10
14
  //# sourceMappingURL=types.d.ts.map