@cumulus/aws-client 18.1.0 → 18.2.0-alpha.0
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.
- package/Lambda.d.ts +3 -3
- package/Lambda.js +14 -12
- package/README.md +1 -1
- package/S3.d.ts +1 -1
- package/SNS.js +1 -1
- package/SQS.d.ts +25 -7
- package/SQS.js +31 -61
- package/StepFunctions.js +3 -0
- package/package.json +19 -15
- package/services.d.ts +6 -3
- package/services.js +6 -3
- package/test-utils.d.ts +3 -3
- package/test-utils.js +3 -3
- package/types.d.ts +4 -1
package/Lambda.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Lambda
|
|
3
3
|
*/
|
|
4
|
+
import { InvocationType } from '@aws-sdk/client-lambda';
|
|
4
5
|
/**
|
|
5
6
|
* Invoke a Lambda function
|
|
6
7
|
*
|
|
7
8
|
* @param {string} name - Lambda function name
|
|
8
9
|
* @param {any} payload - the payload to the Lambda function
|
|
9
10
|
* @param {string} type - the invocation type
|
|
10
|
-
* @returns {Promise<
|
|
11
|
-
*
|
|
11
|
+
* @returns {Promise<InvokeCommandOutput>}
|
|
12
12
|
* @alias module:Lambda.invoke
|
|
13
13
|
*/
|
|
14
|
-
export declare const invoke: (name: string, payload: unknown, type?:
|
|
14
|
+
export declare const invoke: (name: string, payload: unknown, type?: InvocationType) => Promise<false | import("@aws-sdk/client-lambda").InvokeCommandOutput>;
|
|
15
15
|
//# sourceMappingURL=Lambda.d.ts.map
|
package/Lambda.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @module Lambda
|
|
4
|
-
*/
|
|
5
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
4
|
};
|
|
@@ -17,8 +14,7 @@ const log = new logger_1.default({ sender: 'aws-client/Lambda' });
|
|
|
17
14
|
* @param {string} name - Lambda function name
|
|
18
15
|
* @param {any} payload - the payload to the Lambda function
|
|
19
16
|
* @param {string} type - the invocation type
|
|
20
|
-
* @returns {Promise<
|
|
21
|
-
*
|
|
17
|
+
* @returns {Promise<InvokeCommandOutput>}
|
|
22
18
|
* @alias module:Lambda.invoke
|
|
23
19
|
*/
|
|
24
20
|
const invoke = async (name, payload, type = 'Event') => {
|
|
@@ -27,13 +23,19 @@ const invoke = async (name, payload, type = 'Event') => {
|
|
|
27
23
|
return false;
|
|
28
24
|
}
|
|
29
25
|
log.info(`Invoking ${name}`);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
let response;
|
|
27
|
+
try {
|
|
28
|
+
response = await (0, services_1.lambda)().invoke({
|
|
29
|
+
FunctionName: name,
|
|
30
|
+
Payload: new TextEncoder().encode(JSON.stringify(payload)),
|
|
31
|
+
InvocationType: type,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
log.error(`Error invoking ${name}`, error);
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
return response;
|
|
37
39
|
};
|
|
38
40
|
exports.invoke = invoke;
|
|
39
41
|
//# sourceMappingURL=Lambda.js.map
|
package/README.md
CHANGED
|
@@ -298,7 +298,7 @@ Describe a Kinesis stream.
|
|
|
298
298
|
## Lambda
|
|
299
299
|
<a name="module_Lambda.invoke"></a>
|
|
300
300
|
|
|
301
|
-
### Lambda.invoke(name, payload, type) ⇒ <code>Promise.<
|
|
301
|
+
### Lambda.invoke(name, payload, type) ⇒ <code>Promise.<InvokeCommandOutput></code>
|
|
302
302
|
Invoke a Lambda function
|
|
303
303
|
|
|
304
304
|
**Kind**: static method of [<code>Lambda</code>](#module_Lambda)
|
package/S3.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export declare const promiseS3Upload: (params: Omit<UploadOptions, 'client'>) =>
|
|
|
135
135
|
* @param {Object} uploadParams
|
|
136
136
|
* @returns {Promise}
|
|
137
137
|
*/
|
|
138
|
-
export declare const streamS3Upload: (uploadStream: Readable, uploadParams: UploadOptions) => Promise<import("@aws-sdk/client-s3").
|
|
138
|
+
export declare const streamS3Upload: (uploadStream: Readable, uploadParams: UploadOptions) => Promise<import("@aws-sdk/client-s3").CompleteMultipartUploadCommandOutput>;
|
|
139
139
|
/**
|
|
140
140
|
* Get a readable stream for an S3 object
|
|
141
141
|
*
|
package/SNS.js
CHANGED
|
@@ -28,7 +28,7 @@ const publishSnsMessage = async (snsTopicArn, message, retryOptions = {}) => awa
|
|
|
28
28
|
await (0, services_1.sns)().publish({
|
|
29
29
|
TopicArn: snsTopicArn,
|
|
30
30
|
Message: JSON.stringify(message),
|
|
31
|
-
})
|
|
31
|
+
});
|
|
32
32
|
}, {
|
|
33
33
|
maxTimeout: 5000,
|
|
34
34
|
onFailedAttempt: (err) => log.debug(`publishSnsMessage('${snsTopicArn}', '${JSON.stringify(message)}') failed with ${err.retriesLeft} retries left: ${JSON.stringify(err)}`),
|
package/SQS.d.ts
CHANGED
|
@@ -18,11 +18,31 @@ export declare const getQueueUrlByName: (queueName: string) => Promise<string |
|
|
|
18
18
|
* @static
|
|
19
19
|
*/
|
|
20
20
|
export declare function createQueue(QueueName: string): Promise<string | undefined>;
|
|
21
|
-
export declare const deleteQueue: (queueUrl: string) => Promise<
|
|
22
|
-
$response: import("aws-sdk").Response<{}, import("aws-sdk").AWSError>;
|
|
23
|
-
}>;
|
|
21
|
+
export declare const deleteQueue: (queueUrl: string) => Promise<import("@aws-sdk/client-sqs").DeleteQueueCommandOutput>;
|
|
24
22
|
export declare const getQueueAttributes: (queueName: string) => Promise<{
|
|
25
23
|
name: string;
|
|
24
|
+
All?: string | undefined;
|
|
25
|
+
ApproximateNumberOfMessages?: string | undefined;
|
|
26
|
+
ApproximateNumberOfMessagesDelayed?: string | undefined;
|
|
27
|
+
ApproximateNumberOfMessagesNotVisible?: string | undefined;
|
|
28
|
+
ContentBasedDeduplication?: string | undefined;
|
|
29
|
+
CreatedTimestamp?: string | undefined;
|
|
30
|
+
DeduplicationScope?: string | undefined;
|
|
31
|
+
DelaySeconds?: string | undefined;
|
|
32
|
+
FifoQueue?: string | undefined;
|
|
33
|
+
FifoThroughputLimit?: string | undefined;
|
|
34
|
+
KmsDataKeyReusePeriodSeconds?: string | undefined;
|
|
35
|
+
KmsMasterKeyId?: string | undefined;
|
|
36
|
+
LastModifiedTimestamp?: string | undefined;
|
|
37
|
+
MaximumMessageSize?: string | undefined;
|
|
38
|
+
MessageRetentionPeriod?: string | undefined;
|
|
39
|
+
Policy?: string | undefined;
|
|
40
|
+
QueueArn?: string | undefined;
|
|
41
|
+
ReceiveMessageWaitTimeSeconds?: string | undefined;
|
|
42
|
+
RedriveAllowPolicy?: string | undefined;
|
|
43
|
+
RedrivePolicy?: string | undefined;
|
|
44
|
+
SqsManagedSseEnabled?: string | undefined;
|
|
45
|
+
VisibilityTimeout?: string | undefined;
|
|
26
46
|
}>;
|
|
27
47
|
/**
|
|
28
48
|
* Send a message to AWS SQS
|
|
@@ -34,7 +54,7 @@ export declare const getQueueAttributes: (queueName: string) => Promise<{
|
|
|
34
54
|
* @returns {Promise} resolves when the messsage has been sent
|
|
35
55
|
|
|
36
56
|
**/
|
|
37
|
-
export declare const sendSQSMessage: (queueUrl: string, message: string | object, logOverride: Logger) => Promise<import("aws-sdk/
|
|
57
|
+
export declare const sendSQSMessage: (queueUrl: string, message: string | object, logOverride: Logger) => Promise<import("@aws-sdk/client-sqs").SendMessageCommandOutput>;
|
|
38
58
|
declare type ReceiveSQSMessagesOptions = {
|
|
39
59
|
numOfMessages?: number;
|
|
40
60
|
visibilityTimeout?: number;
|
|
@@ -63,9 +83,7 @@ export declare const parseSQSMessageBody: (message: SQSRecord | AWS.SQS.Message)
|
|
|
63
83
|
* @param {integer} receiptHandle - the unique identifier of the sQS message
|
|
64
84
|
* @returns {Promise} an AWS SQS response
|
|
65
85
|
*/
|
|
66
|
-
export declare const deleteSQSMessage: (QueueUrl: string, ReceiptHandle: string) => Promise<
|
|
67
|
-
$response: import("aws-sdk").Response<{}, import("aws-sdk").AWSError>;
|
|
68
|
-
}>;
|
|
86
|
+
export declare const deleteSQSMessage: (QueueUrl: string, ReceiptHandle: string) => Promise<import("@aws-sdk/client-sqs").DeleteMessageCommandOutput>;
|
|
69
87
|
/**
|
|
70
88
|
* Test if an SQS queue exists
|
|
71
89
|
*
|
package/SQS.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
@@ -35,10 +12,8 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
35
12
|
const isObject_1 = __importDefault(require("lodash/isObject"));
|
|
36
13
|
const isString_1 = __importDefault(require("lodash/isString"));
|
|
37
14
|
const isNil_1 = __importDefault(require("lodash/isNil"));
|
|
38
|
-
const
|
|
15
|
+
const client_sqs_1 = require("@aws-sdk/client-sqs");
|
|
39
16
|
const services_1 = require("./services");
|
|
40
|
-
const test_utils_1 = require("./test-utils");
|
|
41
|
-
const utils_1 = require("./utils");
|
|
42
17
|
const log = new logger_1.default({ sender: '@cumulus/aws-client/SQS' });
|
|
43
18
|
const getQueueNameFromUrl = (queueUrl) => queueUrl.split('/').pop();
|
|
44
19
|
exports.getQueueNameFromUrl = getQueueNameFromUrl;
|
|
@@ -48,7 +23,7 @@ const getQueueUrl = (sourceArn, queueName) => {
|
|
|
48
23
|
};
|
|
49
24
|
exports.getQueueUrl = getQueueUrl;
|
|
50
25
|
const getQueueUrlByName = async (queueName) => {
|
|
51
|
-
const response = await (0, services_1.sqs)().getQueueUrl({ QueueName: queueName })
|
|
26
|
+
const response = await (0, services_1.sqs)().getQueueUrl({ QueueName: queueName });
|
|
52
27
|
return response.QueueUrl;
|
|
53
28
|
};
|
|
54
29
|
exports.getQueueUrlByName = getQueueUrlByName;
|
|
@@ -63,33 +38,19 @@ exports.getQueueUrlByName = getQueueUrlByName;
|
|
|
63
38
|
async function createQueue(QueueName) {
|
|
64
39
|
const createQueueResponse = await (0, services_1.sqs)().createQueue({
|
|
65
40
|
QueueName,
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (createQueueResponse.QueueUrl === undefined) {
|
|
71
|
-
throw new Error('Did not receive a QueueUrl');
|
|
72
|
-
}
|
|
73
|
-
// Properly set the Queue URL. This is needed because LocalStack always
|
|
74
|
-
// returns the QueueUrl as "localhost", even if that is not where it should
|
|
75
|
-
// actually be found. CI breaks without this.
|
|
76
|
-
const returnedQueueUrl = url.parse(createQueueResponse.QueueUrl);
|
|
77
|
-
// eslint-disable-next-line unicorn/no-null
|
|
78
|
-
returnedQueueUrl.host = null;
|
|
79
|
-
if (!process.env.LOCALSTACK_HOST) {
|
|
80
|
-
throw new Error('The LOCALSTACK_HOST environment variable must be set');
|
|
81
|
-
}
|
|
82
|
-
returnedQueueUrl.hostname = process.env.LOCALSTACK_HOST;
|
|
83
|
-
return url.format(returnedQueueUrl);
|
|
84
|
-
}
|
|
41
|
+
}).catch((error) => {
|
|
42
|
+
log.error(error);
|
|
43
|
+
throw error;
|
|
44
|
+
});
|
|
85
45
|
return createQueueResponse.QueueUrl;
|
|
86
46
|
}
|
|
87
47
|
exports.createQueue = createQueue;
|
|
88
48
|
const deleteQueue = (queueUrl) => (0, services_1.sqs)().deleteQueue({
|
|
89
49
|
QueueUrl: queueUrl,
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
50
|
+
}).catch((error) => {
|
|
51
|
+
log.error(error);
|
|
52
|
+
throw error;
|
|
53
|
+
});
|
|
93
54
|
exports.deleteQueue = deleteQueue;
|
|
94
55
|
const getQueueAttributes = async (queueName) => {
|
|
95
56
|
const queueUrl = await (0, exports.getQueueUrlByName)(queueName);
|
|
@@ -99,7 +60,7 @@ const getQueueAttributes = async (queueName) => {
|
|
|
99
60
|
const response = await (0, services_1.sqs)().getQueueAttributes({
|
|
100
61
|
AttributeNames: ['All'],
|
|
101
62
|
QueueUrl: queueUrl,
|
|
102
|
-
})
|
|
63
|
+
});
|
|
103
64
|
return {
|
|
104
65
|
...response.Attributes,
|
|
105
66
|
name: queueName,
|
|
@@ -116,7 +77,7 @@ exports.getQueueAttributes = getQueueAttributes;
|
|
|
116
77
|
* @returns {Promise} resolves when the messsage has been sent
|
|
117
78
|
|
|
118
79
|
**/
|
|
119
|
-
|
|
80
|
+
const sendSQSMessage = (queueUrl, message, logOverride) => {
|
|
120
81
|
const logger = logOverride || log;
|
|
121
82
|
let messageBody;
|
|
122
83
|
if ((0, isString_1.default)(message))
|
|
@@ -128,9 +89,12 @@ exports.sendSQSMessage = (0, utils_1.improveStackTrace)((queueUrl, message, logO
|
|
|
128
89
|
return (0, services_1.sqs)().sendMessage({
|
|
129
90
|
MessageBody: messageBody,
|
|
130
91
|
QueueUrl: queueUrl,
|
|
131
|
-
}).
|
|
132
|
-
.
|
|
133
|
-
|
|
92
|
+
}).catch((error) => {
|
|
93
|
+
logger.error(error);
|
|
94
|
+
throw error;
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
exports.sendSQSMessage = sendSQSMessage;
|
|
134
98
|
/**
|
|
135
99
|
* Receives SQS messages from a given queue. The number of messages received
|
|
136
100
|
* can be set and the timeout is also adjustable.
|
|
@@ -146,14 +110,17 @@ exports.sendSQSMessage = (0, utils_1.improveStackTrace)((queueUrl, message, logO
|
|
|
146
110
|
const receiveSQSMessages = async (queueUrl, options) => {
|
|
147
111
|
const params = {
|
|
148
112
|
QueueUrl: queueUrl,
|
|
149
|
-
AttributeNames: [
|
|
113
|
+
AttributeNames: [client_sqs_1.QueueAttributeName.All],
|
|
150
114
|
// 0 is a valid value for VisibilityTimeout
|
|
151
115
|
VisibilityTimeout: (0, isNil_1.default)(options.visibilityTimeout) ? 30 : options.visibilityTimeout,
|
|
152
116
|
WaitTimeSeconds: options.waitTimeSeconds || 0,
|
|
153
117
|
MaxNumberOfMessages: options.numOfMessages || 1,
|
|
154
118
|
};
|
|
155
119
|
const messages = await (0, services_1.sqs)().receiveMessage(params)
|
|
156
|
-
.
|
|
120
|
+
.catch((error) => {
|
|
121
|
+
log.error(error);
|
|
122
|
+
throw error;
|
|
123
|
+
});
|
|
157
124
|
return (messages.Messages ?? []);
|
|
158
125
|
};
|
|
159
126
|
exports.receiveSQSMessages = receiveSQSMessages;
|
|
@@ -166,9 +133,12 @@ exports.parseSQSMessageBody = parseSQSMessageBody;
|
|
|
166
133
|
* @param {integer} receiptHandle - the unique identifier of the sQS message
|
|
167
134
|
* @returns {Promise} an AWS SQS response
|
|
168
135
|
*/
|
|
169
|
-
|
|
170
|
-
.
|
|
171
|
-
.
|
|
136
|
+
const deleteSQSMessage = (QueueUrl, ReceiptHandle) => (0, services_1.sqs)().deleteMessage({ QueueUrl, ReceiptHandle })
|
|
137
|
+
.catch((error) => {
|
|
138
|
+
log.error(error);
|
|
139
|
+
throw error;
|
|
140
|
+
});
|
|
141
|
+
exports.deleteSQSMessage = deleteSQSMessage;
|
|
172
142
|
/**
|
|
173
143
|
* Test if an SQS queue exists
|
|
174
144
|
*
|
|
@@ -182,11 +152,11 @@ const sqsQueueExists = async (queueUrl) => {
|
|
|
182
152
|
throw new Error(`Unable to determine QueueName from ${queueUrl}`);
|
|
183
153
|
}
|
|
184
154
|
try {
|
|
185
|
-
await (0, services_1.sqs)().getQueueUrl({ QueueName })
|
|
155
|
+
await (0, services_1.sqs)().getQueueUrl({ QueueName });
|
|
186
156
|
return true;
|
|
187
157
|
}
|
|
188
158
|
catch (error) {
|
|
189
|
-
if (error.
|
|
159
|
+
if (error.name === 'QueueDoesNotExist') {
|
|
190
160
|
log.warn(`Queue ${QueueName} does not exist`);
|
|
191
161
|
return false;
|
|
192
162
|
}
|
package/StepFunctions.js
CHANGED
|
@@ -6,12 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.listExecutions = exports.getExecutionStatus = exports.getExecutionHistory = exports.executionExists = exports.describeStateMachine = exports.describeExecution = exports.doesExecutionExist = void 0;
|
|
7
7
|
const services_1 = require("./services");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
|
+
const test_utils_1 = require("./test-utils");
|
|
9
10
|
// Utility functions
|
|
10
11
|
const doesExecutionExist = (describeExecutionPromise) => describeExecutionPromise
|
|
11
12
|
.then(() => true)
|
|
12
13
|
.catch((error) => {
|
|
13
14
|
if (error.code === 'ExecutionDoesNotExist')
|
|
14
15
|
return false;
|
|
16
|
+
if ((0, test_utils_1.inTestMode)() && error.code === 'InvalidName')
|
|
17
|
+
return false;
|
|
15
18
|
throw error;
|
|
16
19
|
});
|
|
17
20
|
exports.doesExecutionExist = doesExecutionExist;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/aws-client",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-alpha.0",
|
|
4
4
|
"description": "Utilities for working with AWS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GIBS",
|
|
@@ -44,19 +44,22 @@
|
|
|
44
44
|
"author": "Cumulus Authors",
|
|
45
45
|
"license": "Apache-2.0",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@aws-sdk/client-api-gateway": "^3.
|
|
48
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
49
|
-
"@aws-sdk/client-dynamodb-streams": "^3.
|
|
50
|
-
"@aws-sdk/client-
|
|
51
|
-
"@aws-sdk/
|
|
52
|
-
"@aws-sdk/
|
|
53
|
-
"@aws-sdk/
|
|
54
|
-
"@aws-sdk/
|
|
55
|
-
"@aws-sdk/
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
47
|
+
"@aws-sdk/client-api-gateway": "^3.447.0",
|
|
48
|
+
"@aws-sdk/client-dynamodb": "^3.447.0",
|
|
49
|
+
"@aws-sdk/client-dynamodb-streams": "^3.447.0",
|
|
50
|
+
"@aws-sdk/client-lambda": "^3.447.0",
|
|
51
|
+
"@aws-sdk/client-s3": "^3.447.0",
|
|
52
|
+
"@aws-sdk/client-sns": "^3.447.0",
|
|
53
|
+
"@aws-sdk/client-sqs": "^3.447.0",
|
|
54
|
+
"@aws-sdk/lib-dynamodb": "^3.447.0",
|
|
55
|
+
"@aws-sdk/lib-storage": "^3.447.0",
|
|
56
|
+
"@aws-sdk/s3-request-presigner": "^3.447.0",
|
|
57
|
+
"@aws-sdk/signature-v4-crt": "^3.447.0",
|
|
58
|
+
"@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",
|
|
62
|
+
"aws-sdk": "^2.1492.0",
|
|
60
63
|
"jsonpath-plus": "^1.1.0",
|
|
61
64
|
"lodash": "~4.17.21",
|
|
62
65
|
"mem": "^8.0.2",
|
|
@@ -68,7 +71,8 @@
|
|
|
68
71
|
"uuid": "^8.2.0"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
74
|
+
"@cumulus/test-data": "18.2.0-alpha.0",
|
|
71
75
|
"@types/uuid": "^8.0.0"
|
|
72
76
|
},
|
|
73
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "bad58942a6b271b19587c9a41c09ff8ebd1b1c39"
|
|
74
78
|
}
|
package/services.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { APIGatewayClient } from '@aws-sdk/client-api-gateway';
|
|
2
2
|
import { DynamoDB } from '@aws-sdk/client-dynamodb';
|
|
3
3
|
import { DynamoDBStreamsClient } from '@aws-sdk/client-dynamodb-streams';
|
|
4
|
+
import { Lambda } from '@aws-sdk/client-lambda';
|
|
4
5
|
import { S3 } from '@aws-sdk/client-s3';
|
|
6
|
+
import { SQS } from '@aws-sdk/client-sqs';
|
|
5
7
|
import { DynamoDBDocument, TranslateConfig } from '@aws-sdk/lib-dynamodb';
|
|
8
|
+
import { SNS } from '@aws-sdk/client-sns';
|
|
6
9
|
import * as AWS from 'aws-sdk';
|
|
7
10
|
export declare const apigateway: (params?: object | undefined) => APIGatewayClient;
|
|
8
11
|
export declare const ecs: (params?: object | undefined) => AWS.ECS;
|
|
9
12
|
export declare const ec2: (params?: object | undefined) => AWS.EC2;
|
|
10
13
|
export declare const s3: (params?: object | undefined) => S3;
|
|
11
14
|
export declare const kinesis: (params?: object | undefined) => AWS.Kinesis;
|
|
12
|
-
export declare const lambda: (params?: object | undefined) =>
|
|
13
|
-
export declare const sqs: (params?: object | undefined) =>
|
|
15
|
+
export declare const lambda: (params?: object | undefined) => Lambda;
|
|
16
|
+
export declare const sqs: (params?: object | undefined) => SQS;
|
|
14
17
|
export declare const cloudwatchevents: (params?: object | undefined) => AWS.CloudWatchEvents;
|
|
15
18
|
export declare const cloudwatchlogs: (params?: object | undefined) => AWS.CloudWatchLogs;
|
|
16
19
|
export declare const cloudwatch: (params?: object | undefined) => AWS.CloudWatch;
|
|
@@ -19,7 +22,7 @@ export declare const dynamodbstreams: (params?: object | undefined) => DynamoDBS
|
|
|
19
22
|
export declare const dynamodbDocClient: (docClientOptions?: TranslateConfig, dynamoOptions?: object) => DynamoDBDocument;
|
|
20
23
|
export declare const sfn: (params?: object | undefined) => AWS.StepFunctions;
|
|
21
24
|
export declare const cf: (params?: object | undefined) => AWS.CloudFormation;
|
|
22
|
-
export declare const sns: (params?: object | undefined) =>
|
|
25
|
+
export declare const sns: (params?: object | undefined) => SNS;
|
|
23
26
|
export declare const secretsManager: (params?: object | undefined) => AWS.SecretsManager;
|
|
24
27
|
export declare const systemsManager: (params?: object | undefined) => AWS.SSM;
|
|
25
28
|
export declare const kms: (params?: object | undefined) => AWS.KMS;
|
package/services.js
CHANGED
|
@@ -30,8 +30,11 @@ exports.sts = exports.es = exports.kms = exports.systemsManager = exports.secret
|
|
|
30
30
|
const client_api_gateway_1 = require("@aws-sdk/client-api-gateway");
|
|
31
31
|
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
32
32
|
const client_dynamodb_streams_1 = require("@aws-sdk/client-dynamodb-streams");
|
|
33
|
+
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
33
34
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
35
|
+
const client_sqs_1 = require("@aws-sdk/client-sqs");
|
|
34
36
|
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
|
|
37
|
+
const client_sns_1 = require("@aws-sdk/client-sns");
|
|
35
38
|
const AWS = __importStar(require("aws-sdk"));
|
|
36
39
|
const client_1 = __importDefault(require("./client"));
|
|
37
40
|
exports.apigateway = (0, client_1.default)(client_api_gateway_1.APIGatewayClient, '2015-07-09');
|
|
@@ -39,8 +42,8 @@ exports.ecs = (0, client_1.default)(AWS.ECS, '2014-11-13');
|
|
|
39
42
|
exports.ec2 = (0, client_1.default)(AWS.EC2, '2016-11-15');
|
|
40
43
|
exports.s3 = (0, client_1.default)(client_s3_1.S3, '2006-03-01');
|
|
41
44
|
exports.kinesis = (0, client_1.default)(AWS.Kinesis, '2013-12-02');
|
|
42
|
-
exports.lambda = (0, client_1.default)(
|
|
43
|
-
exports.sqs = (0, client_1.default)(
|
|
45
|
+
exports.lambda = (0, client_1.default)(client_lambda_1.Lambda, '2015-03-31');
|
|
46
|
+
exports.sqs = (0, client_1.default)(client_sqs_1.SQS, '2012-11-05');
|
|
44
47
|
exports.cloudwatchevents = (0, client_1.default)(AWS.CloudWatchEvents, '2014-02-03');
|
|
45
48
|
exports.cloudwatchlogs = (0, client_1.default)(AWS.CloudWatchLogs, '2014-03-28');
|
|
46
49
|
exports.cloudwatch = (0, client_1.default)(AWS.CloudWatch, '2010-08-01');
|
|
@@ -50,7 +53,7 @@ const dynamodbDocClient = (docClientOptions, dynamoOptions) => lib_dynamodb_1.Dy
|
|
|
50
53
|
exports.dynamodbDocClient = dynamodbDocClient;
|
|
51
54
|
exports.sfn = (0, client_1.default)(AWS.StepFunctions, '2016-11-23');
|
|
52
55
|
exports.cf = (0, client_1.default)(AWS.CloudFormation, '2010-05-15');
|
|
53
|
-
exports.sns = (0, client_1.default)(
|
|
56
|
+
exports.sns = (0, client_1.default)(client_sns_1.SNS, '2010-03-31');
|
|
54
57
|
exports.secretsManager = (0, client_1.default)(AWS.SecretsManager, '2017-10-17');
|
|
55
58
|
exports.systemsManager = (0, client_1.default)(AWS.SSM, '2017-10-17');
|
|
56
59
|
exports.kms = (0, client_1.default)(AWS.KMS, '2014-11-01');
|
package/test-utils.d.ts
CHANGED
|
@@ -18,14 +18,14 @@ declare const localStackPorts: {
|
|
|
18
18
|
iam: number;
|
|
19
19
|
kinesis: number;
|
|
20
20
|
kms: number;
|
|
21
|
-
|
|
21
|
+
Lambda: number;
|
|
22
22
|
redshift: number;
|
|
23
23
|
route53: number;
|
|
24
24
|
S3: number;
|
|
25
25
|
secretsmanager: number;
|
|
26
26
|
ses: number;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
SNS: number;
|
|
28
|
+
SQS: number;
|
|
29
29
|
ssm: number;
|
|
30
30
|
sts: number;
|
|
31
31
|
};
|
package/test-utils.js
CHANGED
|
@@ -23,14 +23,14 @@ const localStackPorts = {
|
|
|
23
23
|
iam: 4566,
|
|
24
24
|
kinesis: 4566,
|
|
25
25
|
kms: 4566,
|
|
26
|
-
|
|
26
|
+
Lambda: 4566,
|
|
27
27
|
redshift: 4566,
|
|
28
28
|
route53: 4566,
|
|
29
29
|
S3: 4566,
|
|
30
30
|
secretsmanager: 4566,
|
|
31
31
|
ses: 4566,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
SNS: 4566,
|
|
33
|
+
SQS: 4566,
|
|
34
34
|
ssm: 4566,
|
|
35
35
|
sts: 4566,
|
|
36
36
|
};
|
package/types.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import * as AWS from 'aws-sdk';
|
|
|
2
2
|
import { APIGatewayClient } from '@aws-sdk/client-api-gateway';
|
|
3
3
|
import { DynamoDBStreamsClient } from '@aws-sdk/client-dynamodb-streams';
|
|
4
4
|
import { DynamoDB, DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
5
|
+
import { Lambda } from '@aws-sdk/client-lambda';
|
|
5
6
|
import { S3 } from '@aws-sdk/client-s3';
|
|
6
|
-
|
|
7
|
+
import { SNS } from '@aws-sdk/client-sns';
|
|
8
|
+
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;
|
|
7
10
|
//# sourceMappingURL=types.d.ts.map
|