@aws-sdk/find-v2 0.4.0 → 0.4.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.
- package/dist/cli.js +2 -1
- package/dist/scanLambdaFunctions.js +5 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17,8 +17,9 @@ export const createProgram = () => {
|
|
|
17
17
|
program
|
|
18
18
|
.command("lambda")
|
|
19
19
|
.description("Scans Lambda Node.js Functions for JavaScript SDK v2")
|
|
20
|
-
.option("-r, --region <region>", "AWS region to scan")
|
|
21
20
|
.option("-y, --yes", "answer yes for all prompts")
|
|
21
|
+
.option("-r, --region <region>", "AWS region to scan")
|
|
22
|
+
.option("-p, --profile <profile>", "AWS profile to use")
|
|
22
23
|
.option("-j, --jobs <count>", "number of parallel jobs", (value) => {
|
|
23
24
|
const trimmed = value.trim();
|
|
24
25
|
if (!/^\d+$/.test(trimmed)) {
|
|
@@ -4,8 +4,11 @@ import { getLambdaFunctionScanOutput } from "./getLambdaFunctionScanOutput.js";
|
|
|
4
4
|
import { getDownloadConfirmation } from "./utils/getDownloadConfirmation.js";
|
|
5
5
|
import { getLambdaFunctions } from "./utils/getLambdaFunctions.js";
|
|
6
6
|
export const scanLambdaFunctions = async (options = {}) => {
|
|
7
|
-
const { region, yes, jobs } = options;
|
|
8
|
-
const client = new Lambda({
|
|
7
|
+
const { region, yes, jobs, profile } = options;
|
|
8
|
+
const client = new Lambda({
|
|
9
|
+
...(region && { region }),
|
|
10
|
+
...(profile && { profile }),
|
|
11
|
+
});
|
|
9
12
|
const functions = await getLambdaFunctions(client);
|
|
10
13
|
const functionCount = functions.length;
|
|
11
14
|
const concurrency = Math.min(functionCount, jobs || 1);
|