@gradientedge/cdk-utils 8.91.0 → 8.92.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/.eslintrc.json +40 -0
- package/app/api-destined-function/src/lib/lambda.ts +6 -6
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +6 -6
- package/dist/app/api-destined-function/src/lib/lambda.js +6 -6
- package/dist/lib/lambda.d.ts +6 -6
- package/dist/lib/lambda.js +6 -6
- package/dist/lib/lambda.js.map +1 -1
- package/dist/src/lib/common/construct.d.ts +4 -7
- package/dist/src/lib/common/construct.js +4 -7
- package/dist/src/lib/common/stack.d.ts +9 -13
- package/dist/src/lib/common/stack.js +9 -13
- package/dist/src/lib/common/types.d.ts +0 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/api.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/event.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -27
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +41 -68
- package/dist/src/lib/construct/api-to-eventbridge-target/types.d.ts +13 -25
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +0 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +0 -37
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +44 -81
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/types.d.ts +1 -5
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +0 -3
- package/dist/src/lib/construct/api-to-lambda-target/api.js +0 -3
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +0 -14
- package/dist/src/lib/construct/api-to-lambda-target/main.js +7 -21
- package/dist/src/lib/construct/api-to-lambda-target/types.d.ts +7 -13
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -18
- package/dist/src/lib/construct/graphql-api-lambda/main.js +1 -19
- package/dist/src/lib/construct/graphql-api-lambda/types.d.ts +4 -8
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -11
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +1 -12
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/types.d.ts +1 -3
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +0 -12
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +2 -14
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +0 -18
- package/dist/src/lib/construct/rest-api-lambda/main.js +1 -19
- package/dist/src/lib/construct/rest-api-lambda/types.d.ts +6 -10
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +0 -11
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +3 -14
- package/dist/src/lib/construct/rest-api-lambda-with-cache/types.d.ts +1 -3
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -25
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +32 -52
- package/dist/src/lib/construct/site-with-ecs-backend/types.d.ts +10 -11
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +0 -8
- package/dist/src/lib/construct/static-asset-deployment/main.js +0 -8
- package/dist/src/lib/construct/static-asset-deployment/types.d.ts +1 -1
- package/dist/src/lib/construct/static-site/main.d.ts +0 -17
- package/dist/src/lib/construct/static-site/main.js +1 -18
- package/dist/src/lib/construct/static-site/types.d.ts +9 -11
- package/dist/src/lib/services/aws/api-gateway/main.d.ts +21 -25
- package/dist/src/lib/services/aws/api-gateway/main.js +42 -46
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -2
- package/dist/src/lib/services/aws/appconfig/constants.d.ts +0 -6
- package/dist/src/lib/services/aws/appconfig/constants.js +26 -32
- package/dist/src/lib/services/aws/appconfig/main.d.ts +16 -19
- package/dist/src/lib/services/aws/appconfig/main.js +19 -22
- package/dist/src/lib/services/aws/appconfig/types.d.ts +1 -3
- package/dist/src/lib/services/aws/certificate-manager/main.d.ts +5 -10
- package/dist/src/lib/services/aws/certificate-manager/main.js +5 -10
- package/dist/src/lib/services/aws/certificate-manager/types.d.ts +3 -5
- package/dist/src/lib/services/aws/cloudfront/main.d.ts +41 -47
- package/dist/src/lib/services/aws/cloudfront/main.js +56 -62
- package/dist/src/lib/services/aws/cloudfront/types.d.ts +1 -7
- package/dist/src/lib/services/aws/cloudtrail/main.d.ts +8 -12
- package/dist/src/lib/services/aws/cloudtrail/main.js +8 -12
- package/dist/src/lib/services/aws/cloudtrail/types.d.ts +0 -2
- package/dist/src/lib/services/aws/cloudwatch/logs.d.ts +11 -15
- package/dist/src/lib/services/aws/cloudwatch/logs.js +15 -19
- package/dist/src/lib/services/aws/cloudwatch/main.d.ts +80 -84
- package/dist/src/lib/services/aws/cloudwatch/main.js +116 -122
- package/dist/src/lib/services/aws/cloudwatch/types.d.ts +20 -42
- package/dist/src/lib/services/aws/codebuild/main.d.ts +0 -4
- package/dist/src/lib/services/aws/codebuild/main.js +3 -7
- package/dist/src/lib/services/aws/dynamodb/main.d.ts +3 -7
- package/dist/src/lib/services/aws/dynamodb/main.js +13 -17
- package/dist/src/lib/services/aws/dynamodb/types.d.ts +0 -2
- package/dist/src/lib/services/aws/elastic-container-registry/main.d.ts +3 -7
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +3 -7
- package/dist/src/lib/services/aws/elastic-container-service/main.d.ts +19 -23
- package/dist/src/lib/services/aws/elastic-container-service/main.js +35 -39
- package/dist/src/lib/services/aws/elastic-container-service/types.d.ts +1 -9
- package/dist/src/lib/services/aws/elastic-file-system/main.d.ts +9 -13
- package/dist/src/lib/services/aws/elastic-file-system/main.js +14 -18
- package/dist/src/lib/services/aws/elastic-file-system/types.d.ts +1 -5
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.d.ts +5 -9
- package/dist/src/lib/services/aws/elastic-kubernetes-service/main.js +8 -12
- package/dist/src/lib/services/aws/elastic-kubernetes-service/types.d.ts +1 -3
- package/dist/src/lib/services/aws/elasticache/main.d.ts +14 -18
- package/dist/src/lib/services/aws/elasticache/main.js +35 -39
- package/dist/src/lib/services/aws/elasticache/types.d.ts +0 -4
- package/dist/src/lib/services/aws/eventbridge/main.d.ts +25 -29
- package/dist/src/lib/services/aws/eventbridge/main.js +34 -38
- package/dist/src/lib/services/aws/eventbridge/target.d.ts +6 -9
- package/dist/src/lib/services/aws/eventbridge/target.js +8 -10
- package/dist/src/lib/services/aws/eventbridge/types.d.ts +2 -10
- package/dist/src/lib/services/aws/evidently/main.d.ts +15 -19
- package/dist/src/lib/services/aws/evidently/main.js +19 -23
- package/dist/src/lib/services/aws/evidently/types.d.ts +0 -10
- package/dist/src/lib/services/aws/identity-access-management/main.d.ts +66 -70
- package/dist/src/lib/services/aws/identity-access-management/main.js +97 -101
- package/dist/src/lib/services/aws/key-management-service/main.d.ts +3 -7
- package/dist/src/lib/services/aws/key-management-service/main.js +6 -10
- package/dist/src/lib/services/aws/key-management-service/types.d.ts +0 -2
- package/dist/src/lib/services/aws/lambda/main.d.ts +42 -47
- package/dist/src/lib/services/aws/lambda/main.js +64 -69
- package/dist/src/lib/services/aws/lambda/types.d.ts +6 -16
- package/dist/src/lib/services/aws/route53/main.d.ts +17 -21
- package/dist/src/lib/services/aws/route53/main.js +19 -23
- package/dist/src/lib/services/aws/route53/types.d.ts +0 -2
- package/dist/src/lib/services/aws/secrets-manager/main.d.ts +6 -19
- package/dist/src/lib/services/aws/secrets-manager/main.js +6 -25
- package/dist/src/lib/services/aws/simple-notification-service/main.d.ts +8 -12
- package/dist/src/lib/services/aws/simple-notification-service/main.js +10 -14
- package/dist/src/lib/services/aws/simple-notification-service/types.d.ts +0 -2
- package/dist/src/lib/services/aws/simple-queue-service/main.d.ts +11 -15
- package/dist/src/lib/services/aws/simple-queue-service/main.js +19 -23
- package/dist/src/lib/services/aws/simple-queue-service/types.d.ts +4 -6
- package/dist/src/lib/services/aws/simple-storage-service/main.d.ts +24 -32
- package/dist/src/lib/services/aws/simple-storage-service/main.js +32 -40
- package/dist/src/lib/services/aws/simple-storage-service/types.d.ts +2 -8
- package/dist/src/lib/services/aws/step-function/main.d.ts +55 -59
- package/dist/src/lib/services/aws/step-function/main.js +91 -95
- package/dist/src/lib/services/aws/step-function/types.d.ts +0 -32
- package/dist/src/lib/services/aws/systems-manager/main.d.ts +10 -16
- package/dist/src/lib/services/aws/systems-manager/main.js +13 -19
- package/dist/src/lib/services/aws/systems-manager/types.d.ts +0 -2
- package/dist/src/lib/services/aws/virtual-private-cloud/main.d.ts +9 -12
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +10 -16
- package/dist/src/lib/services/aws/web-application-firewall/main.d.ts +6 -10
- package/dist/src/lib/services/aws/web-application-firewall/main.js +12 -16
- package/dist/src/lib/services/aws/web-application-firewall/types.d.ts +0 -4
- package/dist/src/lib/types/aws/index.d.ts +0 -2
- package/dist/src/lib/utils/aws/index.d.ts +6 -9
- package/dist/src/lib/utils/aws/index.js +7 -10
- package/dist/src/lib/utils/index.d.ts +6 -13
- package/dist/src/lib/utils/index.js +4 -12
- package/package.json +1 -1
- package/src/lib/common/construct.ts +4 -7
- package/src/lib/common/stack.ts +9 -13
- package/src/lib/common/types.ts +0 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target/event.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target/main.ts +41 -68
- package/src/lib/construct/api-to-eventbridge-target/types.ts +13 -25
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +0 -3
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +44 -81
- package/src/lib/construct/api-to-eventbridge-target-with-sns/types.ts +1 -5
- package/src/lib/construct/api-to-lambda-target/api.ts +0 -3
- package/src/lib/construct/api-to-lambda-target/main.ts +7 -21
- package/src/lib/construct/api-to-lambda-target/types.ts +7 -13
- package/src/lib/construct/graphql-api-lambda/main.ts +1 -19
- package/src/lib/construct/graphql-api-lambda/types.ts +4 -8
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +1 -12
- package/src/lib/construct/graphql-api-lambda-with-cache/types.ts +1 -3
- package/src/lib/construct/lambda-with-iam-access/main.ts +2 -14
- package/src/lib/construct/rest-api-lambda/main.ts +1 -19
- package/src/lib/construct/rest-api-lambda/types.ts +6 -10
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +3 -14
- package/src/lib/construct/rest-api-lambda-with-cache/types.ts +1 -3
- package/src/lib/construct/site-with-ecs-backend/main.ts +31 -52
- package/src/lib/construct/site-with-ecs-backend/types.ts +10 -11
- package/src/lib/construct/static-asset-deployment/main.ts +0 -8
- package/src/lib/construct/static-asset-deployment/types.ts +1 -1
- package/src/lib/construct/static-site/main.ts +1 -18
- package/src/lib/construct/static-site/types.ts +9 -11
- package/src/lib/services/aws/api-gateway/main.ts +43 -47
- package/src/lib/services/aws/api-gateway/types.ts +0 -2
- package/src/lib/services/aws/appconfig/constants.ts +26 -32
- package/src/lib/services/aws/appconfig/main.ts +19 -22
- package/src/lib/services/aws/appconfig/types.ts +1 -3
- package/src/lib/services/aws/certificate-manager/main.ts +5 -10
- package/src/lib/services/aws/certificate-manager/types.ts +3 -5
- package/src/lib/services/aws/cloudfront/main.ts +56 -62
- package/src/lib/services/aws/cloudfront/types.ts +1 -7
- package/src/lib/services/aws/cloudtrail/main.ts +8 -12
- package/src/lib/services/aws/cloudtrail/types.ts +0 -2
- package/src/lib/services/aws/cloudwatch/logs.ts +15 -19
- package/src/lib/services/aws/cloudwatch/main.ts +116 -122
- package/src/lib/services/aws/cloudwatch/types.ts +20 -42
- package/src/lib/services/aws/codebuild/main.ts +3 -7
- package/src/lib/services/aws/dynamodb/main.ts +13 -17
- package/src/lib/services/aws/dynamodb/types.ts +0 -2
- package/src/lib/services/aws/elastic-container-registry/main.ts +3 -7
- package/src/lib/services/aws/elastic-container-service/main.ts +35 -39
- package/src/lib/services/aws/elastic-container-service/types.ts +1 -9
- package/src/lib/services/aws/elastic-file-system/main.ts +14 -18
- package/src/lib/services/aws/elastic-file-system/types.ts +1 -5
- package/src/lib/services/aws/elastic-kubernetes-service/main.ts +8 -12
- package/src/lib/services/aws/elastic-kubernetes-service/types.ts +1 -3
- package/src/lib/services/aws/elasticache/main.ts +35 -39
- package/src/lib/services/aws/elasticache/types.ts +0 -4
- package/src/lib/services/aws/eventbridge/main.ts +34 -38
- package/src/lib/services/aws/eventbridge/target.ts +8 -11
- package/src/lib/services/aws/eventbridge/types.ts +2 -10
- package/src/lib/services/aws/evidently/main.ts +19 -23
- package/src/lib/services/aws/evidently/types.ts +0 -10
- package/src/lib/services/aws/identity-access-management/main.ts +97 -101
- package/src/lib/services/aws/key-management-service/main.ts +6 -10
- package/src/lib/services/aws/key-management-service/types.ts +0 -2
- package/src/lib/services/aws/lambda/main.ts +64 -69
- package/src/lib/services/aws/lambda/types.ts +6 -16
- package/src/lib/services/aws/route53/main.ts +19 -23
- package/src/lib/services/aws/route53/types.ts +0 -2
- package/src/lib/services/aws/secrets-manager/main.ts +6 -28
- package/src/lib/services/aws/simple-notification-service/main.ts +10 -14
- package/src/lib/services/aws/simple-notification-service/types.ts +0 -2
- package/src/lib/services/aws/simple-queue-service/main.ts +19 -23
- package/src/lib/services/aws/simple-queue-service/types.ts +4 -6
- package/src/lib/services/aws/simple-storage-service/main.ts +32 -40
- package/src/lib/services/aws/simple-storage-service/types.ts +2 -8
- package/src/lib/services/aws/step-function/main.ts +91 -95
- package/src/lib/services/aws/step-function/types.ts +0 -32
- package/src/lib/services/aws/systems-manager/main.ts +13 -19
- package/src/lib/services/aws/systems-manager/types.ts +0 -2
- package/src/lib/services/aws/virtual-private-cloud/main.ts +10 -16
- package/src/lib/services/aws/web-application-firewall/main.ts +12 -16
- package/src/lib/services/aws/web-application-firewall/types.ts +0 -4
- package/src/lib/types/aws/index.ts +0 -2
- package/src/lib/utils/aws/index.ts +7 -10
- package/src/lib/utils/index.ts +4 -12
|
@@ -28,10 +28,7 @@ const common_1 = require("../../common");
|
|
|
28
28
|
const iam = __importStar(require("aws-cdk-lib/aws-iam"));
|
|
29
29
|
const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
|
|
30
30
|
/**
|
|
31
|
-
* @category cdk-utils.lambda-with-iam-access
|
|
32
|
-
* @subcategory construct
|
|
33
31
|
* @classdesc Provides a construct to create a lambda function with IAM access
|
|
34
|
-
*
|
|
35
32
|
* @example
|
|
36
33
|
* import { LambdaWithIamAccess, LambdaWithIamAccessProps } '@gradientedge/cdk-utils'
|
|
37
34
|
* import { Construct } from 'constructs'
|
|
@@ -44,7 +41,6 @@ const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
|
|
|
44
41
|
* this.initResources()
|
|
45
42
|
* }
|
|
46
43
|
* }
|
|
47
|
-
* @mixin
|
|
48
44
|
*/
|
|
49
45
|
class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
50
46
|
/* LambdaWithIamAccess props */
|
|
@@ -66,7 +62,6 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
68
64
|
* @summary Initialise and provision resources
|
|
69
|
-
* @protected
|
|
70
65
|
*/
|
|
71
66
|
initResources() {
|
|
72
67
|
this.createLambdaPolicy();
|
|
@@ -79,7 +74,6 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
79
74
|
}
|
|
80
75
|
/**
|
|
81
76
|
* @summary Method to create iam policy for Lambda function
|
|
82
|
-
* @protected
|
|
83
77
|
*/
|
|
84
78
|
createLambdaPolicy() {
|
|
85
79
|
this.lambdaPolicy = new iam.PolicyDocument({
|
|
@@ -88,25 +82,22 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
88
82
|
}
|
|
89
83
|
/**
|
|
90
84
|
* @summary Method to create iam role for Lambda function
|
|
91
|
-
* @protected
|
|
92
85
|
*/
|
|
93
86
|
createLambdaRole() {
|
|
94
87
|
this.lambdaRole = this.iamManager.createRoleForLambda(`${this.id}-lambda-role`, this, this.lambdaPolicy);
|
|
95
88
|
}
|
|
96
89
|
/**
|
|
97
90
|
* @summary Method to create environment variables for Lambda function
|
|
98
|
-
* @protected
|
|
99
91
|
*/
|
|
100
92
|
createLambdaEnvironment() {
|
|
101
93
|
this.lambdaEnvironment = {
|
|
102
|
-
NODE_ENV: this.props.nodeEnv,
|
|
103
94
|
LOG_LEVEL: this.props.logLevel,
|
|
95
|
+
NODE_ENV: this.props.nodeEnv,
|
|
104
96
|
TZ: this.props.timezone,
|
|
105
97
|
};
|
|
106
98
|
}
|
|
107
99
|
/**
|
|
108
100
|
* @summary Method to create layers for Lambda function
|
|
109
|
-
* @protected
|
|
110
101
|
*/
|
|
111
102
|
createLambdaLayers() {
|
|
112
103
|
const layers = [];
|
|
@@ -119,14 +110,12 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
119
110
|
}
|
|
120
111
|
/**
|
|
121
112
|
* @summary Method to create lambda function
|
|
122
|
-
* @protected
|
|
123
113
|
*/
|
|
124
114
|
createLambdaFunction() {
|
|
125
115
|
this.lambdaFunction = this.lambdaManager.createLambdaFunction(`${this.id}-lambda`, this, this.props.lambda, this.lambdaRole, this.lambdaLayers, this.props.lambdaSource, this.props.lambdaHandler || 'index.handler', this.lambdaEnvironment);
|
|
126
116
|
}
|
|
127
117
|
/**
|
|
128
118
|
* @summary Method to create iam user for the lambda function
|
|
129
|
-
* @protected
|
|
130
119
|
*/
|
|
131
120
|
createIamUserForLambdaFunction() {
|
|
132
121
|
this.lambdaIamUser = new iam.User(this, `${this.id}-lambda-user`, {
|
|
@@ -136,8 +125,8 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
136
125
|
policyName: `${this.id}-policy-${this.props.stage}`,
|
|
137
126
|
statements: [
|
|
138
127
|
new iam.PolicyStatement({
|
|
139
|
-
resources: [this.lambdaFunction.functionArn],
|
|
140
128
|
actions: ['lambda:InvokeFunction'],
|
|
129
|
+
resources: [this.lambdaFunction.functionArn],
|
|
141
130
|
}),
|
|
142
131
|
],
|
|
143
132
|
users: [this.lambdaIamUser],
|
|
@@ -148,7 +137,6 @@ class LambdaWithIamAccess extends common_1.CommonConstruct {
|
|
|
148
137
|
}
|
|
149
138
|
/**
|
|
150
139
|
* @summary Method to create iam secret for the lambda function
|
|
151
|
-
* @protected
|
|
152
140
|
*/
|
|
153
141
|
createIamSecretForLambdaFunction() {
|
|
154
142
|
this.lambdaUserAccessSecret = new secretsManager.Secret(this, `${this.id}-lambda-user-secret-${this.props.stage}`, this.props.lambdaSecret);
|
|
@@ -8,12 +8,9 @@ import { Construct } from 'constructs';
|
|
|
8
8
|
import { CommonConstruct } from '../../common';
|
|
9
9
|
import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types';
|
|
10
10
|
/**
|
|
11
|
-
* @category cdk-utils.rest-api-lambda
|
|
12
|
-
* @subcategory construct
|
|
13
11
|
* @classdesc Provides a construct to create and deploy a RestApi as Lambda
|
|
14
12
|
*
|
|
15
13
|
* <b>Architecture</b><br/> 
|
|
16
|
-
*
|
|
17
14
|
* @example
|
|
18
15
|
* import { RestApiLambda, RestApiLambdaProps } '@gradientedge/cdk-utils'
|
|
19
16
|
* import { Construct } from 'constructs'
|
|
@@ -26,7 +23,6 @@ import { RestApiLambdaEnvironment, RestApiLambdaProps } from './types';
|
|
|
26
23
|
* this.initResources()
|
|
27
24
|
* }
|
|
28
25
|
* }
|
|
29
|
-
* @mixin
|
|
30
26
|
*/
|
|
31
27
|
export declare abstract class RestApiLambda extends CommonConstruct {
|
|
32
28
|
props: RestApiLambdaProps;
|
|
@@ -45,74 +41,60 @@ export declare abstract class RestApiLambda extends CommonConstruct {
|
|
|
45
41
|
protected constructor(parent: Construct, id: string, props: RestApiLambdaProps);
|
|
46
42
|
/**
|
|
47
43
|
* @summary Initialise and provision resources
|
|
48
|
-
* @protected
|
|
49
44
|
*/
|
|
50
45
|
protected initResources(): void;
|
|
51
46
|
/**
|
|
52
47
|
* @summary Method to resolve secrets from SecretsManager
|
|
53
48
|
* - To be implemented in the overriding method in the implementation class
|
|
54
|
-
* @protected
|
|
55
49
|
*/
|
|
56
50
|
protected resolveSecrets(): void;
|
|
57
51
|
/**
|
|
58
52
|
* @summary Method to resolve a hosted zone based on domain attributes
|
|
59
|
-
* @protected
|
|
60
53
|
*/
|
|
61
54
|
protected resolveHostedZone(): void;
|
|
62
55
|
/**
|
|
63
56
|
* @summary Method to resolve a certificate based on attributes
|
|
64
|
-
* @protected
|
|
65
57
|
*/
|
|
66
58
|
protected resolveCertificate(): void;
|
|
67
59
|
/**
|
|
68
60
|
* @summary Method to create iam policy for RestApi Lambda function
|
|
69
|
-
* @protected
|
|
70
61
|
*/
|
|
71
62
|
protected createLambdaPolicy(): void;
|
|
72
63
|
/**
|
|
73
64
|
* @summary Method to create iam role for RestApi Lambda function
|
|
74
|
-
* @protected
|
|
75
65
|
*/
|
|
76
66
|
protected createLambdaRole(): void;
|
|
77
67
|
/**
|
|
78
68
|
* @summary Method to create environment variables for RestApi Lambda function
|
|
79
|
-
* @protected
|
|
80
69
|
*/
|
|
81
70
|
protected createLambdaEnvironment(): void;
|
|
82
71
|
/**
|
|
83
72
|
* @summary Method to create layers for RestApi Lambda function
|
|
84
|
-
* @protected
|
|
85
73
|
*/
|
|
86
74
|
protected createLambdaLayers(): void;
|
|
87
75
|
/**
|
|
88
76
|
* @summary Method to create lambda function for RestApi
|
|
89
|
-
* @protected
|
|
90
77
|
*/
|
|
91
78
|
protected createLambdaFunction(): void;
|
|
92
79
|
/**
|
|
93
80
|
* @summary Method to create rest restApiLambda for RestApi
|
|
94
|
-
* @protected
|
|
95
81
|
*/
|
|
96
82
|
protected createRestApi(): void;
|
|
97
83
|
protected abstract createRestApiResources(): void;
|
|
98
84
|
/**
|
|
99
85
|
* @summary Method to create custom restApiLambda domain for RestApi
|
|
100
|
-
* @protected
|
|
101
86
|
*/
|
|
102
87
|
protected createApiDomain(): void;
|
|
103
88
|
/**
|
|
104
89
|
* @summary Method to create base path mappings for RestApi
|
|
105
|
-
* @protected
|
|
106
90
|
*/
|
|
107
91
|
protected createApiBasePathMapping(): void;
|
|
108
92
|
/**
|
|
109
93
|
* @summary Method to create route53 records for RestApi
|
|
110
|
-
* @protected
|
|
111
94
|
*/
|
|
112
95
|
protected createApiRouteAssets(): void;
|
|
113
96
|
/**
|
|
114
97
|
* @summary Method to deploy the changes to the RestApi
|
|
115
|
-
* @protected
|
|
116
98
|
*/
|
|
117
99
|
protected createRestApiDeployment(): void;
|
|
118
100
|
}
|
|
@@ -28,12 +28,9 @@ const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
|
|
|
28
28
|
const iam = __importStar(require("aws-cdk-lib/aws-iam"));
|
|
29
29
|
const common_1 = require("../../common");
|
|
30
30
|
/**
|
|
31
|
-
* @category cdk-utils.rest-api-lambda
|
|
32
|
-
* @subcategory construct
|
|
33
31
|
* @classdesc Provides a construct to create and deploy a RestApi as Lambda
|
|
34
32
|
*
|
|
35
33
|
* <b>Architecture</b><br/> 
|
|
36
|
-
*
|
|
37
34
|
* @example
|
|
38
35
|
* import { RestApiLambda, RestApiLambdaProps } '@gradientedge/cdk-utils'
|
|
39
36
|
* import { Construct } from 'constructs'
|
|
@@ -46,7 +43,6 @@ const common_1 = require("../../common");
|
|
|
46
43
|
* this.initResources()
|
|
47
44
|
* }
|
|
48
45
|
* }
|
|
49
|
-
* @mixin
|
|
50
46
|
*/
|
|
51
47
|
class RestApiLambda extends common_1.CommonConstruct {
|
|
52
48
|
/* restApiLambda props */
|
|
@@ -71,7 +67,6 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
71
67
|
}
|
|
72
68
|
/**
|
|
73
69
|
* @summary Initialise and provision resources
|
|
74
|
-
* @protected
|
|
75
70
|
*/
|
|
76
71
|
initResources() {
|
|
77
72
|
this.resolveSecrets();
|
|
@@ -92,21 +87,18 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
92
87
|
/**
|
|
93
88
|
* @summary Method to resolve secrets from SecretsManager
|
|
94
89
|
* - To be implemented in the overriding method in the implementation class
|
|
95
|
-
* @protected
|
|
96
90
|
*/
|
|
97
91
|
resolveSecrets() {
|
|
98
92
|
this.applicationSecrets = [];
|
|
99
93
|
}
|
|
100
94
|
/**
|
|
101
95
|
* @summary Method to resolve a hosted zone based on domain attributes
|
|
102
|
-
* @protected
|
|
103
96
|
*/
|
|
104
97
|
resolveHostedZone() {
|
|
105
98
|
this.restApiHostedZone = this.route53Manager.withHostedZoneFromFullyQualifiedDomainName(`${this.id}-hosted-zone`, this, this.props.useExistingHostedZone);
|
|
106
99
|
}
|
|
107
100
|
/**
|
|
108
101
|
* @summary Method to resolve a certificate based on attributes
|
|
109
|
-
* @protected
|
|
110
102
|
*/
|
|
111
103
|
resolveCertificate() {
|
|
112
104
|
if (this.props.restApiCertificate.useExistingCertificate &&
|
|
@@ -118,7 +110,6 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
118
110
|
}
|
|
119
111
|
/**
|
|
120
112
|
* @summary Method to create iam policy for RestApi Lambda function
|
|
121
|
-
* @protected
|
|
122
113
|
*/
|
|
123
114
|
createLambdaPolicy() {
|
|
124
115
|
this.restApiLambdaPolicy = new iam.PolicyDocument({
|
|
@@ -127,25 +118,22 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
127
118
|
}
|
|
128
119
|
/**
|
|
129
120
|
* @summary Method to create iam role for RestApi Lambda function
|
|
130
|
-
* @protected
|
|
131
121
|
*/
|
|
132
122
|
createLambdaRole() {
|
|
133
123
|
this.restApiLambdaRole = this.iamManager.createRoleForLambda(`${this.id}-lambda-role`, this, this.restApiLambdaPolicy);
|
|
134
124
|
}
|
|
135
125
|
/**
|
|
136
126
|
* @summary Method to create environment variables for RestApi Lambda function
|
|
137
|
-
* @protected
|
|
138
127
|
*/
|
|
139
128
|
createLambdaEnvironment() {
|
|
140
129
|
this.restApiLambdaEnvironment = {
|
|
141
|
-
NODE_ENV: this.props.nodeEnv,
|
|
142
130
|
LOG_LEVEL: this.props.logLevel,
|
|
131
|
+
NODE_ENV: this.props.nodeEnv,
|
|
143
132
|
TZ: this.props.timezone,
|
|
144
133
|
};
|
|
145
134
|
}
|
|
146
135
|
/**
|
|
147
136
|
* @summary Method to create layers for RestApi Lambda function
|
|
148
|
-
* @protected
|
|
149
137
|
*/
|
|
150
138
|
createLambdaLayers() {
|
|
151
139
|
const layers = [];
|
|
@@ -158,21 +146,18 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
158
146
|
}
|
|
159
147
|
/**
|
|
160
148
|
* @summary Method to create lambda function for RestApi
|
|
161
|
-
* @protected
|
|
162
149
|
*/
|
|
163
150
|
createLambdaFunction() {
|
|
164
151
|
this.restApiLambdaFunction = this.lambdaManager.createLambdaFunction(`${this.id}-restapi-server`, this, this.props.restApiLambda, this.restApiLambdaRole, this.restApiLambdaLayers, this.props.restApiSource, this.props.restApiHandler || 'index.handler', this.restApiLambdaEnvironment);
|
|
165
152
|
}
|
|
166
153
|
/**
|
|
167
154
|
* @summary Method to create rest restApiLambda for RestApi
|
|
168
|
-
* @protected
|
|
169
155
|
*/
|
|
170
156
|
createRestApi() {
|
|
171
157
|
this.restApi = this.apiManager.createLambdaRestApi(`${this.id}-lambda-rest-api`, this, this.props.restApi, this.restApiLambdaFunction);
|
|
172
158
|
}
|
|
173
159
|
/**
|
|
174
160
|
* @summary Method to create custom restApiLambda domain for RestApi
|
|
175
|
-
* @protected
|
|
176
161
|
*/
|
|
177
162
|
createApiDomain() {
|
|
178
163
|
this.restApiDomain = this.apiManager.createApiDomain(`${this.id}-api-domain`, this, this.isProductionStage() || this.props.skipStageForARecords
|
|
@@ -181,7 +166,6 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
181
166
|
}
|
|
182
167
|
/**
|
|
183
168
|
* @summary Method to create base path mappings for RestApi
|
|
184
|
-
* @protected
|
|
185
169
|
*/
|
|
186
170
|
createApiBasePathMapping() {
|
|
187
171
|
const apiRootPaths = this.props.apiRootPaths;
|
|
@@ -205,14 +189,12 @@ class RestApiLambda extends common_1.CommonConstruct {
|
|
|
205
189
|
}
|
|
206
190
|
/**
|
|
207
191
|
* @summary Method to create route53 records for RestApi
|
|
208
|
-
* @protected
|
|
209
192
|
*/
|
|
210
193
|
createApiRouteAssets() {
|
|
211
194
|
this.route53Manager.createApiGatewayARecord(`${this.id}-custom-domain-a-record`, this, this.props.apiSubDomain, this.restApiDomain, this.restApiHostedZone, this.props.skipStageForARecords);
|
|
212
195
|
}
|
|
213
196
|
/**
|
|
214
197
|
* @summary Method to deploy the changes to the RestApi
|
|
215
|
-
* @protected
|
|
216
198
|
*/
|
|
217
199
|
createRestApiDeployment() {
|
|
218
200
|
this.apiManager.createApiDeployment(`${this.id}-deployment`, this, this.restApi);
|
|
@@ -2,26 +2,22 @@ import { AcmProps, LambdaEnvironment, LambdaProps, LambdaRestApiProps } from '..
|
|
|
2
2
|
import { CommonStackProps } from '../../common';
|
|
3
3
|
import { AssetCode } from 'aws-cdk-lib/aws-lambda';
|
|
4
4
|
/**
|
|
5
|
-
* @category cdk-utils.rest-api-lambda
|
|
6
|
-
* @subcategory Types
|
|
7
5
|
*/
|
|
8
6
|
export interface RestApiLambdaEnvironment extends LambdaEnvironment {
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
11
|
-
* @category cdk-utils.rest-api-lambda
|
|
12
|
-
* @subcategory Properties
|
|
13
9
|
*/
|
|
14
10
|
export interface RestApiLambdaProps extends CommonStackProps {
|
|
15
11
|
apiRootPaths?: string[];
|
|
16
12
|
apiSubDomain: string;
|
|
17
|
-
|
|
13
|
+
logLevel: string;
|
|
14
|
+
nodeEnv: string;
|
|
18
15
|
restApi: LambdaRestApiProps;
|
|
19
|
-
|
|
16
|
+
restApiCertificate: AcmProps;
|
|
20
17
|
restApiHandler: string;
|
|
21
|
-
restApiSource: AssetCode;
|
|
22
18
|
restApiLambda: LambdaProps;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
logLevel: string;
|
|
19
|
+
restApiLambdaLayerSources?: AssetCode[];
|
|
20
|
+
restApiSource: AssetCode;
|
|
26
21
|
timezone: string;
|
|
22
|
+
useExistingHostedZone: boolean;
|
|
27
23
|
}
|
|
@@ -4,13 +4,9 @@ import { Construct } from 'constructs';
|
|
|
4
4
|
import { RestApiLambda } from '..';
|
|
5
5
|
import { RestApiLambdaWithCacheProps } from './types';
|
|
6
6
|
/**
|
|
7
|
-
* @stability stable
|
|
8
|
-
* @category cdk-utils.rest-api-lambda-with-cache
|
|
9
|
-
* @subcategory construct
|
|
10
7
|
* @classdesc Provides a construct to create and deploy a RestApi API as Lambda with Caching
|
|
11
8
|
*
|
|
12
9
|
* <b>Architecture</b><br/> 
|
|
13
|
-
*
|
|
14
10
|
* @example
|
|
15
11
|
* import { RestApiLambdaWithCacheProps } '@gradientedge/cdk-utils'
|
|
16
12
|
* import { Construct } from 'constructs'
|
|
@@ -23,7 +19,6 @@ import { RestApiLambdaWithCacheProps } from './types';
|
|
|
23
19
|
* this.initResources()
|
|
24
20
|
* }
|
|
25
21
|
* }
|
|
26
|
-
* @mixin
|
|
27
22
|
*/
|
|
28
23
|
export declare abstract class RestApiLambdaWithCache extends RestApiLambda {
|
|
29
24
|
props: RestApiLambdaWithCacheProps;
|
|
@@ -36,32 +31,26 @@ export declare abstract class RestApiLambdaWithCache extends RestApiLambda {
|
|
|
36
31
|
protected initResources(): void;
|
|
37
32
|
/**
|
|
38
33
|
* Create VPC
|
|
39
|
-
* @protected
|
|
40
34
|
*/
|
|
41
35
|
protected resolveVpc(): void;
|
|
42
36
|
/**
|
|
43
37
|
* Resolve Security Group
|
|
44
|
-
* @protected
|
|
45
38
|
*/
|
|
46
39
|
protected resolveSecurityGroup(): void;
|
|
47
40
|
/**
|
|
48
41
|
* Create ElastiCache
|
|
49
|
-
* @protected
|
|
50
42
|
*/
|
|
51
43
|
protected createElastiCache(): void;
|
|
52
44
|
/**
|
|
53
45
|
* Create Lambda Role
|
|
54
|
-
* @protected
|
|
55
46
|
*/
|
|
56
47
|
protected createLambdaRole(): void;
|
|
57
48
|
/**
|
|
58
49
|
* @summary Method to create environment variables for RestApi Lambda function
|
|
59
|
-
* @protected
|
|
60
50
|
*/
|
|
61
51
|
protected createLambdaEnvironment(): void;
|
|
62
52
|
/**
|
|
63
53
|
* @summary Method to create lambda function for RestApi API
|
|
64
|
-
* @protected
|
|
65
54
|
*/
|
|
66
55
|
protected createLambdaFunction(): void;
|
|
67
56
|
}
|
|
@@ -30,13 +30,9 @@ const iam = __importStar(require("aws-cdk-lib/aws-iam"));
|
|
|
30
30
|
const __1 = require("..");
|
|
31
31
|
const utils = __importStar(require("../../utils"));
|
|
32
32
|
/**
|
|
33
|
-
* @stability stable
|
|
34
|
-
* @category cdk-utils.rest-api-lambda-with-cache
|
|
35
|
-
* @subcategory construct
|
|
36
33
|
* @classdesc Provides a construct to create and deploy a RestApi API as Lambda with Caching
|
|
37
34
|
*
|
|
38
35
|
* <b>Architecture</b><br/> 
|
|
39
|
-
*
|
|
40
36
|
* @example
|
|
41
37
|
* import { RestApiLambdaWithCacheProps } '@gradientedge/cdk-utils'
|
|
42
38
|
* import { Construct } from 'constructs'
|
|
@@ -49,7 +45,6 @@ const utils = __importStar(require("../../utils"));
|
|
|
49
45
|
* this.initResources()
|
|
50
46
|
* }
|
|
51
47
|
* }
|
|
52
|
-
* @mixin
|
|
53
48
|
*/
|
|
54
49
|
class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
55
50
|
/* restApiLambdaWithCache props */
|
|
@@ -73,7 +68,6 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
|
73
68
|
}
|
|
74
69
|
/**
|
|
75
70
|
* Create VPC
|
|
76
|
-
* @protected
|
|
77
71
|
*/
|
|
78
72
|
resolveVpc() {
|
|
79
73
|
if (this.props.useExistingVpc) {
|
|
@@ -85,7 +79,6 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
|
85
79
|
}
|
|
86
80
|
/**
|
|
87
81
|
* Resolve Security Group
|
|
88
|
-
* @protected
|
|
89
82
|
*/
|
|
90
83
|
resolveSecurityGroup() {
|
|
91
84
|
if (!this.props.restApiCache) {
|
|
@@ -105,7 +98,6 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
|
105
98
|
}
|
|
106
99
|
/**
|
|
107
100
|
* Create ElastiCache
|
|
108
|
-
* @protected
|
|
109
101
|
*/
|
|
110
102
|
createElastiCache() {
|
|
111
103
|
if (!this.props.restApiCache) {
|
|
@@ -113,19 +105,18 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
|
113
105
|
}
|
|
114
106
|
this.restApiCache = this.elasticacheManager.createReplicatedElastiCache(`${this.id}-elasticache`, this, this.props.restApiCache, this.restApivpc.privateSubnets.map(subnet => subnet.subnetId), [this.restApiSecurityGroup.securityGroupId]);
|
|
115
107
|
this.ssmManager.writeStringToParameters(`${this.id}-elasticache-endpoint-address`, this, {
|
|
116
|
-
parameterName: `${this.id}-elasticache-endpoint-address`,
|
|
117
108
|
description: `Elasticache address to use by applications`,
|
|
109
|
+
parameterName: `${this.id}-elasticache-endpoint-address`,
|
|
118
110
|
stringValue: this.restApiCache.attrConfigurationEndPointAddress,
|
|
119
111
|
});
|
|
120
112
|
this.ssmManager.writeStringToParameters(`${this.id}-elasticache-endpoint-port`, this, {
|
|
121
|
-
parameterName: `${this.id}-elasticache-endpoint-port`,
|
|
122
113
|
description: `Elasticache port to use by applications`,
|
|
114
|
+
parameterName: `${this.id}-elasticache-endpoint-port`,
|
|
123
115
|
stringValue: this.restApiCache.attrConfigurationEndPointPort,
|
|
124
116
|
});
|
|
125
117
|
}
|
|
126
118
|
/**
|
|
127
119
|
* Create Lambda Role
|
|
128
|
-
* @protected
|
|
129
120
|
*/
|
|
130
121
|
createLambdaRole() {
|
|
131
122
|
super.createLambdaRole();
|
|
@@ -133,18 +124,16 @@ class RestApiLambdaWithCache extends __1.RestApiLambda {
|
|
|
133
124
|
}
|
|
134
125
|
/**
|
|
135
126
|
* @summary Method to create environment variables for RestApi Lambda function
|
|
136
|
-
* @protected
|
|
137
127
|
*/
|
|
138
128
|
createLambdaEnvironment() {
|
|
139
129
|
this.restApiLambdaEnvironment = {
|
|
140
|
-
NODE_ENV: this.props.nodeEnv,
|
|
141
130
|
LOG_LEVEL: this.props.logLevel,
|
|
131
|
+
NODE_ENV: this.props.nodeEnv,
|
|
142
132
|
TZ: this.props.timezone,
|
|
143
133
|
};
|
|
144
134
|
}
|
|
145
135
|
/**
|
|
146
136
|
* @summary Method to create lambda function for RestApi API
|
|
147
|
-
* @protected
|
|
148
137
|
*/
|
|
149
138
|
createLambdaFunction() {
|
|
150
139
|
this.restApiLambdaFunction = this.lambdaManager.createLambdaFunction(`${this.id}-restapi-server`, this, this.props.restApiLambda, this.restApiLambdaRole, this.restApiLambdaLayers, this.props.restApiSource, this.props.restApiHandler || 'index.handler', this.restApiLambdaEnvironment, this.restApivpc, [this.restApiSecurityGroup], undefined, undefined, this.restApivpc);
|
|
@@ -2,12 +2,10 @@ import { RestApiLambdaProps } from '../rest-api-lambda';
|
|
|
2
2
|
import { VpcProps } from 'aws-cdk-lib/aws-ec2';
|
|
3
3
|
import { ReplicatedElastiCacheProps } from '../../services';
|
|
4
4
|
/**
|
|
5
|
-
* @category cdk-utils.rest-api-lambda-with-cache
|
|
6
|
-
* @subcategory Properties
|
|
7
5
|
*/
|
|
8
6
|
export interface RestApiLambdaWithCacheProps extends RestApiLambdaProps {
|
|
9
|
-
restApiVpc: VpcProps;
|
|
10
7
|
restApiCache: ReplicatedElastiCacheProps;
|
|
8
|
+
restApiVpc: VpcProps;
|
|
11
9
|
securityGroupExportName: string;
|
|
12
10
|
useExistingVpc: boolean;
|
|
13
11
|
vpcName?: string;
|
|
@@ -13,11 +13,7 @@ import { Construct } from 'constructs';
|
|
|
13
13
|
import { CommonConstruct } from '../../common';
|
|
14
14
|
import { SiteWithEcsBackendProps } from './types';
|
|
15
15
|
/**
|
|
16
|
-
* @stability stable
|
|
17
|
-
* @category cdk-utils.site-with-ecs-backend
|
|
18
|
-
* @subcategory construct
|
|
19
16
|
* @classdesc Provides a construct to create and deploy a site hosted with an clustered ECS/ELB backend
|
|
20
|
-
*
|
|
21
17
|
* @example
|
|
22
18
|
* import { SiteWithEcsBackend, SiteWithEcsBackendProps } '@gradientedge/cdk-utils'
|
|
23
19
|
* import { Construct } from 'constructs'
|
|
@@ -30,7 +26,6 @@ import { SiteWithEcsBackendProps } from './types';
|
|
|
30
26
|
* this.initResources()
|
|
31
27
|
* }
|
|
32
28
|
* }
|
|
33
|
-
* @mixin
|
|
34
29
|
*/
|
|
35
30
|
export declare class SiteWithEcsBackend extends CommonConstruct {
|
|
36
31
|
props: SiteWithEcsBackendProps;
|
|
@@ -66,104 +61,84 @@ export declare class SiteWithEcsBackend extends CommonConstruct {
|
|
|
66
61
|
constructor(parent: Construct, id: string, props: SiteWithEcsBackendProps);
|
|
67
62
|
/**
|
|
68
63
|
* @summary Initialise and provision resources
|
|
69
|
-
* @protected
|
|
70
64
|
*/
|
|
71
65
|
protected initResources(): void;
|
|
72
66
|
/**
|
|
73
67
|
* @summary Method to resolve a hosted zone based on domain attributes
|
|
74
|
-
* @protected
|
|
75
68
|
*/
|
|
76
69
|
protected resolveHostedZone(): void;
|
|
77
70
|
/**
|
|
78
71
|
* @summary Method to resolve a certificate based on attributes
|
|
79
|
-
* @protected
|
|
80
72
|
*/
|
|
81
73
|
protected resolveCertificate(): void;
|
|
82
74
|
/**
|
|
83
75
|
* @summary Method to resolve secrets from SecretsManager
|
|
84
76
|
* - To be implemented in the overriding method in the implementation class
|
|
85
|
-
* @protected
|
|
86
77
|
*/
|
|
87
78
|
protected resolveSiteSecrets(): void;
|
|
88
79
|
/**
|
|
89
80
|
* @summary Method to resolve site domain names
|
|
90
|
-
* @protected
|
|
91
81
|
*/
|
|
92
82
|
protected resolveSiteDomainNames(): void;
|
|
93
83
|
/**
|
|
94
84
|
* Create VPC
|
|
95
|
-
* @protected
|
|
96
85
|
*/
|
|
97
86
|
protected createVpc(): void;
|
|
98
87
|
/**
|
|
99
88
|
* @summary Method to create iam policy for ECS Task
|
|
100
|
-
* @protected
|
|
101
89
|
*/
|
|
102
90
|
protected createEcsPolicy(): void;
|
|
103
91
|
/**
|
|
104
92
|
* @summary Method to create iam role for ECS Task
|
|
105
|
-
* @protected
|
|
106
93
|
*/
|
|
107
94
|
protected createEcsRole(): void;
|
|
108
95
|
/**
|
|
109
96
|
* @summary Method to create environment variables used by ECS task
|
|
110
|
-
* @protected
|
|
111
97
|
*/
|
|
112
98
|
protected createEcsEnvironment(): void;
|
|
113
99
|
/**
|
|
114
100
|
* Method to create an ECS cluster
|
|
115
|
-
* @protected
|
|
116
101
|
*/
|
|
117
102
|
protected createEcsCluster(): void;
|
|
118
103
|
/**
|
|
119
104
|
* Method to create log group used by ECS task
|
|
120
|
-
* @protected
|
|
121
105
|
*/
|
|
122
106
|
protected createEcsLogGroup(): void;
|
|
123
107
|
/**
|
|
124
108
|
* Method to create docker build arguments for ECS Image step
|
|
125
|
-
* @protected
|
|
126
109
|
*/
|
|
127
110
|
protected createEcsBuildArgs(): void;
|
|
128
111
|
/**
|
|
129
112
|
* Method to create container image for ECS task
|
|
130
|
-
* @protected
|
|
131
113
|
*/
|
|
132
114
|
protected createEcsContainerImage(): void;
|
|
133
115
|
/**
|
|
134
116
|
* Method to create Application Loadbalanced ECS Fargate Service
|
|
135
|
-
* @protected
|
|
136
117
|
*/
|
|
137
118
|
protected createEcsService(): void;
|
|
138
119
|
/**
|
|
139
120
|
* Method to create log bucket for site distribution
|
|
140
|
-
* @protected
|
|
141
121
|
*/
|
|
142
122
|
protected createSiteLogBucket(): void;
|
|
143
123
|
protected createSiteOrigin(): void;
|
|
144
124
|
/**
|
|
145
125
|
* @summary Method to create a site cloudfront function
|
|
146
|
-
* @protected
|
|
147
126
|
*/
|
|
148
127
|
protected createSiteCloudfrontFunction(): void;
|
|
149
128
|
/**
|
|
150
129
|
* @summary Method to create a site cloudfront function associations
|
|
151
|
-
* @protected
|
|
152
130
|
*/
|
|
153
131
|
protected resolveSiteFunctionAssociations(): void;
|
|
154
132
|
/**
|
|
155
133
|
* Method to create Site distribution
|
|
156
|
-
* @protected
|
|
157
134
|
*/
|
|
158
135
|
protected createDistribution(): void;
|
|
159
136
|
/**
|
|
160
137
|
* Method to create Route53 records for distribution
|
|
161
|
-
* @protected
|
|
162
138
|
*/
|
|
163
139
|
protected createNetworkMappings(): void;
|
|
164
140
|
/**
|
|
165
141
|
* Method to invalidation the cloudfront distribution cache after a deployment
|
|
166
|
-
* @protected
|
|
167
142
|
*/
|
|
168
143
|
protected invalidateDistributionCache(): void;
|
|
169
144
|
}
|