@go-to-k/cdkd 0.3.4 → 0.3.6
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 +22 -13
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.3.6.tgz +0 -0
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.3.4.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -11033,11 +11033,14 @@ var LambdaFunctionProvider = class {
|
|
|
11033
11033
|
// DescribeNetworkInterfaces (right after the update, the API can return
|
|
11034
11034
|
// an empty list even though ENIs still exist).
|
|
11035
11035
|
// - per-ENI retry budget: an in-use ENI cannot be deleted until AWS
|
|
11036
|
-
// finishes the asynchronous detach
|
|
11036
|
+
// finishes the asynchronous detach. AWS's hyperplane ENI release is
|
|
11037
|
+
// eventually-consistent and can take 5-30 minutes in practice — the
|
|
11038
|
+
// budget here must cover that worst case so downstream Subnet/SG
|
|
11039
|
+
// deletes don't race ahead and fail with "has dependencies".
|
|
11037
11040
|
// - retry interval: polling cadence inside the per-ENI loop.
|
|
11038
11041
|
eniInitialSleepMs = 1e4;
|
|
11039
|
-
eniDeleteRetryBudgetMs =
|
|
11040
|
-
eniDeleteRetryIntervalMs =
|
|
11042
|
+
eniDeleteRetryBudgetMs = 30 * 60 * 1e3;
|
|
11043
|
+
eniDeleteRetryIntervalMs = 15e3;
|
|
11041
11044
|
constructor() {
|
|
11042
11045
|
const awsClients = getAwsClients();
|
|
11043
11046
|
this.lambdaClient = awsClients.lambda;
|
|
@@ -11429,10 +11432,14 @@ var LambdaFunctionProvider = class {
|
|
|
11429
11432
|
}
|
|
11430
11433
|
/**
|
|
11431
11434
|
* List Lambda-managed ENIs for the given function, paginating through
|
|
11432
|
-
* DescribeNetworkInterfaces and filtering on Description
|
|
11435
|
+
* DescribeNetworkInterfaces and filtering on Description.
|
|
11433
11436
|
*
|
|
11434
|
-
*
|
|
11435
|
-
*
|
|
11437
|
+
* We filter directly on `description=AWS Lambda VPC ENI-*` (the EC2 API
|
|
11438
|
+
* supports `*` wildcards on this filter — same approach as delstack). An
|
|
11439
|
+
* earlier attempt narrowed with `requester-id=*:awslambda_*`, but real
|
|
11440
|
+
* Lambda hyperplane ENIs carry a RequesterId of the form
|
|
11441
|
+
* `AROAXXX...:<account-id>` (no literal "awslambda" substring), so that
|
|
11442
|
+
* filter matched nothing and the cleanup loop quietly listed zero ENIs.
|
|
11436
11443
|
*/
|
|
11437
11444
|
async listLambdaEnis(functionName) {
|
|
11438
11445
|
const enis = [];
|
|
@@ -11441,10 +11448,7 @@ var LambdaFunctionProvider = class {
|
|
|
11441
11448
|
do {
|
|
11442
11449
|
const resp = await this.ec2Client.send(
|
|
11443
11450
|
new DescribeNetworkInterfacesCommand({
|
|
11444
|
-
Filters: [
|
|
11445
|
-
// Lambda hyperplane ENIs are owned by the Lambda service principal.
|
|
11446
|
-
{ Name: "requester-id", Values: ["*:awslambda_*"] }
|
|
11447
|
-
],
|
|
11451
|
+
Filters: [{ Name: "description", Values: [`${descriptionPrefix}*`] }],
|
|
11448
11452
|
NextToken: nextToken
|
|
11449
11453
|
})
|
|
11450
11454
|
);
|
|
@@ -14404,7 +14408,10 @@ var EC2Provider = class {
|
|
|
14404
14408
|
new DescribeNetworkInterfacesCommand2({
|
|
14405
14409
|
Filters: [
|
|
14406
14410
|
{ Name: "subnet-id", Values: [subnetId] },
|
|
14407
|
-
|
|
14411
|
+
// `description` filter is the only reliable way to find Lambda
|
|
14412
|
+
// hyperplane ENIs — `requester-id` does not actually contain the
|
|
14413
|
+
// string "awslambda" (it is an AROA principal id).
|
|
14414
|
+
{ Name: "description", Values: ["AWS Lambda VPC ENI-*"] }
|
|
14408
14415
|
]
|
|
14409
14416
|
})
|
|
14410
14417
|
);
|
|
@@ -14962,7 +14969,9 @@ var EC2Provider = class {
|
|
|
14962
14969
|
new DescribeNetworkInterfacesCommand2({
|
|
14963
14970
|
Filters: [
|
|
14964
14971
|
{ Name: "group-id", Values: [groupId] },
|
|
14965
|
-
|
|
14972
|
+
// See cleanupSubnetLambdaEnis: requester-id does not contain
|
|
14973
|
+
// "awslambda" — filter on description instead.
|
|
14974
|
+
{ Name: "description", Values: ["AWS Lambda VPC ENI-*"] }
|
|
14966
14975
|
]
|
|
14967
14976
|
})
|
|
14968
14977
|
);
|
|
@@ -27759,7 +27768,7 @@ function reorderArgs(argv) {
|
|
|
27759
27768
|
}
|
|
27760
27769
|
async function main() {
|
|
27761
27770
|
const program = new Command8();
|
|
27762
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.3.
|
|
27771
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.3.6");
|
|
27763
27772
|
program.addCommand(createBootstrapCommand());
|
|
27764
27773
|
program.addCommand(createSynthCommand());
|
|
27765
27774
|
program.addCommand(createDeployCommand());
|