@gradientedge/cdk-utils 8.54.0 → 8.56.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.
|
@@ -126,11 +126,15 @@ class LambdaManager {
|
|
|
126
126
|
insightsVersion: props.insightsVersion,
|
|
127
127
|
},
|
|
128
128
|
});
|
|
129
|
-
if (props.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
if (props.lambdaAliases && props.lambdaAliases.length > 0) {
|
|
130
|
+
props.lambdaAliases.forEach(alias => {
|
|
131
|
+
const functionAlias = this.createLambdaFunctionAlias(`${id}-${alias.aliasName}`, scope, alias, lambdaFunction.currentVersion);
|
|
132
|
+
if (alias.provisionedConcurrency) {
|
|
133
|
+
const functionAutoScaling = functionAlias.addAutoScaling(alias.provisionedConcurrency);
|
|
134
|
+
functionAutoScaling.scaleOnUtilization({
|
|
135
|
+
utilizationTarget: alias.provisionedConcurrency.utilizationTarget,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
134
138
|
});
|
|
135
139
|
}
|
|
136
140
|
if (props.tags && props.tags.length > 0) {
|
|
@@ -700,14 +700,14 @@ export interface LambdaProps extends lambda.FunctionProps {
|
|
|
700
700
|
timeoutInSecs?: number;
|
|
701
701
|
excludeLastModifiedTimestamp?: boolean;
|
|
702
702
|
tags?: TagProps[];
|
|
703
|
-
|
|
704
|
-
lambdaAlias?: LambdaAliasProps;
|
|
703
|
+
lambdaAliases?: LambdaAliasProps[];
|
|
705
704
|
}
|
|
706
705
|
/**
|
|
707
706
|
* @category cdk-utils.lambda-manager
|
|
708
707
|
* @subcategory Properties
|
|
709
708
|
*/
|
|
710
709
|
export interface LambdaAliasProps extends lambda.AliasProps {
|
|
710
|
+
provisionedConcurrency?: ProvisionedConcurrencyProps;
|
|
711
711
|
}
|
|
712
712
|
/**
|
|
713
713
|
* @category cdk-utils.lambda-manager
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.56.0",
|
|
4
4
|
"description": "Utilities for AWS CDK provisioning",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@types/lodash": "^4.14.194",
|
|
49
|
-
"@types/node": "^20.1.
|
|
49
|
+
"@types/node": "^20.1.3",
|
|
50
50
|
"app-root-path": "^3.1.0",
|
|
51
|
-
"aws-cdk-lib": "^2.
|
|
52
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
53
|
-
"constructs": "^10.2.
|
|
51
|
+
"aws-cdk-lib": "^2.79.1",
|
|
52
|
+
"@aws-sdk/client-secrets-manager": "^3.332.0",
|
|
53
|
+
"constructs": "^10.2.21",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"moment": "^2.29.4",
|
|
56
56
|
"nconf": "^0.12.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@types/jest": "^29.5.1",
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
66
66
|
"@typescript-eslint/parser": "^5.59.5",
|
|
67
|
-
"aws-cdk": "^2.
|
|
67
|
+
"aws-cdk": "^2.79.1",
|
|
68
68
|
"better-docs": "^2.7.2",
|
|
69
69
|
"codecov": "^3.8.3",
|
|
70
70
|
"commitizen": "^4.3.0",
|
|
@@ -130,17 +130,21 @@ export class LambdaManager {
|
|
|
130
130
|
},
|
|
131
131
|
})
|
|
132
132
|
|
|
133
|
-
if (props.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
if (props.lambdaAliases && props.lambdaAliases.length > 0) {
|
|
134
|
+
props.lambdaAliases.forEach(alias => {
|
|
135
|
+
const functionAlias = this.createLambdaFunctionAlias(
|
|
136
|
+
`${id}-${alias.aliasName}`,
|
|
137
|
+
scope,
|
|
138
|
+
alias,
|
|
139
|
+
lambdaFunction.currentVersion
|
|
140
|
+
)
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
if (alias.provisionedConcurrency) {
|
|
143
|
+
const functionAutoScaling = functionAlias.addAutoScaling(alias.provisionedConcurrency)
|
|
144
|
+
functionAutoScaling.scaleOnUtilization({
|
|
145
|
+
utilizationTarget: alias.provisionedConcurrency.utilizationTarget,
|
|
146
|
+
})
|
|
147
|
+
}
|
|
144
148
|
})
|
|
145
149
|
}
|
|
146
150
|
|
|
@@ -749,15 +749,16 @@ export interface LambdaProps extends lambda.FunctionProps {
|
|
|
749
749
|
timeoutInSecs?: number
|
|
750
750
|
excludeLastModifiedTimestamp?: boolean
|
|
751
751
|
tags?: TagProps[]
|
|
752
|
-
|
|
753
|
-
lambdaAlias?: LambdaAliasProps
|
|
752
|
+
lambdaAliases?: LambdaAliasProps[]
|
|
754
753
|
}
|
|
755
754
|
|
|
756
755
|
/**
|
|
757
756
|
* @category cdk-utils.lambda-manager
|
|
758
757
|
* @subcategory Properties
|
|
759
758
|
*/
|
|
760
|
-
export interface LambdaAliasProps extends lambda.AliasProps {
|
|
759
|
+
export interface LambdaAliasProps extends lambda.AliasProps {
|
|
760
|
+
provisionedConcurrency?: ProvisionedConcurrencyProps
|
|
761
|
+
}
|
|
761
762
|
|
|
762
763
|
/**
|
|
763
764
|
* @category cdk-utils.lambda-manager
|