serverless-provisioned-concurrency-autoscaling
Advanced tools
Comparing version 1.2.2 to 1.3.0
@@ -23,3 +23,3 @@ "use strict"; | ||
MinCapacity: this.data.minimum, | ||
ResourceId: `function:${this.data.name}:provisioned`, | ||
ResourceId: `function:${this.data.name}:${this.data.alias}`, | ||
ScalableDimension: 'lambda:function:ProvisionedConcurrency', | ||
@@ -26,0 +26,0 @@ ServiceNamespace: 'lambda', |
@@ -76,8 +76,8 @@ "use strict"; | ||
? { | ||
customMetric: this.customMetricDefaults(config.customMetric, config.name), | ||
customMetric: this.customMetricDefaults(config.customMetric, config.name, config.alias), | ||
} | ||
: {}; | ||
return Object.assign({ maximum: config.maximum || 10, minimum: config.minimum || 1, scaleInCooldown: config.scaleInCooldown || 120, scaleOutCooldown: config.scaleOutCooldown || 0, usage: config.usage || 0.75, function: config.function, name: config.name }, customMetricConfig); | ||
return Object.assign({ maximum: config.maximum || 10, minimum: config.minimum || 1, scaleInCooldown: config.scaleInCooldown || 120, scaleOutCooldown: config.scaleOutCooldown || 0, usage: config.usage || 0.75, function: config.function, name: config.name, alias: config.alias || 'provisioned' }, customMetricConfig); | ||
} | ||
customMetricDefaults(customMetric, functionName) { | ||
customMetricDefaults(customMetric, functionName, alias) { | ||
const defaultDimensions = [ | ||
@@ -90,3 +90,3 @@ { | ||
name: 'Resource', | ||
value: `${functionName}:provisioned`, | ||
value: `${functionName}:${alias}`, | ||
}, | ||
@@ -93,0 +93,0 @@ ]; |
{ | ||
"name": "serverless-provisioned-concurrency-autoscaling", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Serverless Plugin for AWS Lambdas Provisioned Concurrency Auto Scaling configuration.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -41,3 +41,3 @@  | ||
# full configuration | ||
# full configuration | ||
@@ -49,2 +49,3 @@ world: | ||
enabled: true | ||
alias: provisioned | ||
maximum: 10 | ||
@@ -66,2 +67,3 @@ minimum: 1 | ||
```yaml | ||
alias: provisioned | ||
maximum: 10 | ||
@@ -68,0 +70,0 @@ minimum: 1 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
41702
357
90
0