@adobe/helix-deploy 13.4.1 → 13.5.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/CHANGELOG.md +7 -0
- package/package.json +3 -3
- package/src/deploy/AWSConfig.js +23 -2
- package/src/deploy/AWSDeployer.js +21 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [13.5.0](https://github.com/adobe/helix-deploy/compare/v13.4.1...v13.5.0) (2026-03-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **aws:** add --aws-reserved-concurrency option ([#902](https://github.com/adobe/helix-deploy/issues/902)) ([b42a7d6](https://github.com/adobe/helix-deploy/commit/b42a7d6bbbf78783f5aaf42ab0392748c54a9de3))
|
|
7
|
+
|
|
1
8
|
## [13.4.1](https://github.com/adobe/helix-deploy/compare/v13.4.0...v13.4.1) (2026-03-10)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.5.0",
|
|
4
4
|
"description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/adobe/helix-deploy#readme",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"@eslint/config-helpers": "0.5.2",
|
|
67
67
|
"@semantic-release/changelog": "6.0.3",
|
|
68
68
|
"@semantic-release/git": "10.0.1",
|
|
69
|
-
"c8": "
|
|
69
|
+
"c8": "11.0.0",
|
|
70
70
|
"eslint": "9.4.0",
|
|
71
71
|
"husky": "9.1.7",
|
|
72
72
|
"lint-staged": "16.2.7",
|
|
73
73
|
"mocha": "11.7.5",
|
|
74
74
|
"mocha-junit-reporter": "2.2.1",
|
|
75
75
|
"mocha-multi-reporters": "1.5.1",
|
|
76
|
-
"nock": "
|
|
76
|
+
"nock": "14.0.11",
|
|
77
77
|
"semantic-release": "25.0.3",
|
|
78
78
|
"xml2js": "0.6.2",
|
|
79
79
|
"yauzl": "3.2.0"
|
package/src/deploy/AWSConfig.js
CHANGED
|
@@ -63,6 +63,7 @@ export default class AWSConfig {
|
|
|
63
63
|
ephemeralStorage: undefined,
|
|
64
64
|
vpcSubnetIds: undefined,
|
|
65
65
|
vpcSecurityGroupIds: undefined,
|
|
66
|
+
reservedConcurrency: undefined,
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -91,7 +92,8 @@ export default class AWSConfig {
|
|
|
91
92
|
.withAWSHandler(argv.awsHandler)
|
|
92
93
|
.withAWSEphemeralStorage(argv.awsEphemeralStorage)
|
|
93
94
|
.withAWSVpcSubnetIds(argv.awsVpcSubnetIds)
|
|
94
|
-
.withAWSVpcSecurityGroupIds(argv.awsVpcSecurityGroupIds)
|
|
95
|
+
.withAWSVpcSecurityGroupIds(argv.awsVpcSecurityGroupIds)
|
|
96
|
+
.withAWSReservedConcurrency(argv.awsReservedConcurrency);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
withAWSRegion(value) {
|
|
@@ -232,6 +234,17 @@ export default class AWSConfig {
|
|
|
232
234
|
return this;
|
|
233
235
|
}
|
|
234
236
|
|
|
237
|
+
withAWSReservedConcurrency(value) {
|
|
238
|
+
if (value !== undefined) {
|
|
239
|
+
const n = Number(value);
|
|
240
|
+
if (!Number.isInteger(n) || n < 0) {
|
|
241
|
+
throw new Error('aws-reserved-concurrency must be a non-negative integer');
|
|
242
|
+
}
|
|
243
|
+
this.reservedConcurrency = n;
|
|
244
|
+
}
|
|
245
|
+
return this;
|
|
246
|
+
}
|
|
247
|
+
|
|
235
248
|
static yarg(yargs) {
|
|
236
249
|
return yargs
|
|
237
250
|
.group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
|
|
@@ -239,7 +252,8 @@ export default class AWSConfig {
|
|
|
239
252
|
'aws-lambda-format', 'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets',
|
|
240
253
|
'aws-deploy-bucket', 'aws-identity-source', 'aws-log-format', 'aws-layers',
|
|
241
254
|
'aws-tracing-mode', 'aws-extra-permissions', 'aws-tags', 'aws-handler',
|
|
242
|
-
'aws-ephemeral-storage', 'aws-vpc-subnet-ids', 'aws-vpc-security-group-ids'
|
|
255
|
+
'aws-ephemeral-storage', 'aws-vpc-subnet-ids', 'aws-vpc-security-group-ids',
|
|
256
|
+
'aws-reserved-concurrency'], 'AWS Deployment Options')
|
|
243
257
|
.option('aws-region', {
|
|
244
258
|
description: 'the AWS region to deploy lambda functions to',
|
|
245
259
|
type: 'string',
|
|
@@ -357,6 +371,13 @@ export default class AWSConfig {
|
|
|
357
371
|
description: 'List of VPC security group IDs to attach the Lambda function to.',
|
|
358
372
|
type: 'string',
|
|
359
373
|
array: true,
|
|
374
|
+
})
|
|
375
|
+
.option('aws-reserved-concurrency', {
|
|
376
|
+
description: 'Reserved concurrency limit for the Lambda function (non-negative integer). '
|
|
377
|
+
+ 'Set to 0 to completely throttle the function. '
|
|
378
|
+
+ 'Requires lambda:PutFunctionConcurrency on the deploy role. '
|
|
379
|
+
+ 'Note: once set, omitting this flag does NOT remove the limit — use the AWS console or CLI to call DeleteFunctionConcurrency.',
|
|
380
|
+
type: 'number',
|
|
360
381
|
});
|
|
361
382
|
}
|
|
362
383
|
}
|
|
@@ -31,7 +31,8 @@ import {
|
|
|
31
31
|
CreateFunctionCommand, DeleteAliasCommand, DeleteFunctionCommand, GetAliasCommand,
|
|
32
32
|
GetFunctionCommand,
|
|
33
33
|
LambdaClient, ListAliasesCommand, ListTagsCommand, ListVersionsByFunctionCommand,
|
|
34
|
-
PublishVersionCommand,
|
|
34
|
+
PublishVersionCommand, PutFunctionConcurrencyCommand, TagResourceCommand,
|
|
35
|
+
UntagResourceCommand, UpdateAliasCommand,
|
|
35
36
|
UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand,
|
|
36
37
|
} from '@aws-sdk/client-lambda';
|
|
37
38
|
|
|
@@ -391,6 +392,25 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
391
392
|
throw e;
|
|
392
393
|
}
|
|
393
394
|
}
|
|
395
|
+
|
|
396
|
+
if (this._cfg.reservedConcurrency !== undefined) {
|
|
397
|
+
if (this._cfg.reservedConcurrency === 0) {
|
|
398
|
+
this.log.warn(chalk`{yellow warn}: setting reserved concurrency to 0 for {yellow ${functionName}} — function will be completely throttled`);
|
|
399
|
+
} else {
|
|
400
|
+
this.log.info(chalk`--: setting reserved concurrency to {yellow ${this._cfg.reservedConcurrency}} for {yellow ${functionName}}`);
|
|
401
|
+
}
|
|
402
|
+
try {
|
|
403
|
+
await this._lambda.send(new PutFunctionConcurrencyCommand({
|
|
404
|
+
FunctionName: functionName,
|
|
405
|
+
ReservedConcurrentExecutions: this._cfg.reservedConcurrency,
|
|
406
|
+
}));
|
|
407
|
+
this.log.info(chalk`{green ok}: reserved concurrency for {yellow ${functionName}} set to {yellow ${this._cfg.reservedConcurrency}}. Requires {yellow lambda:PutFunctionConcurrency} on the deploy role.`);
|
|
408
|
+
} catch (e) {
|
|
409
|
+
this.log.error(`Failed to set reserved concurrency for ${functionName} to ${this._cfg.reservedConcurrency}: ${e.message}`);
|
|
410
|
+
this.log.error('Ensure the deploy role has lambda:PutFunctionConcurrency permission. Function code was deployed successfully.');
|
|
411
|
+
throw e;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
394
414
|
}
|
|
395
415
|
|
|
396
416
|
async initApiId() {
|