@gradientedge/cdk-utils-aws 2.5.0 → 2.7.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.
Files changed (125) hide show
  1. package/dist/src/construct/api-to-any-target/main.d.ts +11 -0
  2. package/dist/src/construct/api-to-any-target/main.js +11 -2
  3. package/dist/src/construct/api-to-any-target/target.d.ts +16 -1
  4. package/dist/src/construct/api-to-any-target/target.js +16 -1
  5. package/dist/src/construct/api-to-any-target/types.d.ts +52 -0
  6. package/dist/src/construct/api-to-eventbridge-target/api.d.ts +18 -0
  7. package/dist/src/construct/api-to-eventbridge-target/api.js +18 -0
  8. package/dist/src/construct/api-to-eventbridge-target/event.d.ts +7 -0
  9. package/dist/src/construct/api-to-eventbridge-target/event.js +7 -0
  10. package/dist/src/construct/api-to-eventbridge-target/main.d.ts +12 -0
  11. package/dist/src/construct/api-to-eventbridge-target/main.js +12 -3
  12. package/dist/src/construct/api-to-eventbridge-target/types.d.ts +67 -0
  13. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +7 -0
  14. package/dist/src/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.js +7 -0
  15. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.d.ts +13 -0
  16. package/dist/src/construct/api-to-eventbridge-target-with-sns/main.js +13 -4
  17. package/dist/src/construct/api-to-eventbridge-target-with-sns/types.d.ts +12 -0
  18. package/dist/src/construct/api-to-lambda-target/api.d.ts +19 -0
  19. package/dist/src/construct/api-to-lambda-target/api.js +19 -0
  20. package/dist/src/construct/api-to-lambda-target/main.d.ts +24 -0
  21. package/dist/src/construct/api-to-lambda-target/main.js +24 -2
  22. package/dist/src/construct/api-to-lambda-target/types.d.ts +41 -0
  23. package/dist/src/construct/application-configuration/main.d.ts +29 -1
  24. package/dist/src/construct/application-configuration/main.js +28 -1
  25. package/dist/src/construct/application-configuration/types.d.ts +5 -0
  26. package/dist/src/construct/event-handler/handler.d.ts +23 -1
  27. package/dist/src/construct/event-handler/handler.js +23 -1
  28. package/dist/src/construct/event-handler/main.d.ts +13 -0
  29. package/dist/src/construct/event-handler/main.js +13 -0
  30. package/dist/src/construct/event-handler/types.d.ts +35 -0
  31. package/dist/src/construct/lambda-with-iam-access/main.d.ts +21 -0
  32. package/dist/src/construct/lambda-with-iam-access/main.js +21 -2
  33. package/dist/src/construct/lambda-with-iam-access/types.d.ts +18 -0
  34. package/dist/src/construct/piped-event-handler/main.d.ts +9 -0
  35. package/dist/src/construct/piped-event-handler/main.js +9 -0
  36. package/dist/src/construct/piped-event-handler/types.d.ts +7 -0
  37. package/dist/src/construct/rest-api-lambda/main.d.ts +23 -0
  38. package/dist/src/construct/rest-api-lambda/main.js +19 -2
  39. package/dist/src/construct/rest-api-lambda/types.d.ts +14 -0
  40. package/dist/src/construct/rest-api-lambda-with-cache/main.d.ts +12 -0
  41. package/dist/src/construct/rest-api-lambda-with-cache/main.js +12 -2
  42. package/dist/src/construct/rest-api-lambda-with-cache/types.d.ts +6 -0
  43. package/dist/src/construct/site-with-ecs-backend/constants.d.ts +5 -0
  44. package/dist/src/construct/site-with-ecs-backend/constants.js +5 -0
  45. package/dist/src/construct/site-with-ecs-backend/main.d.ts +37 -0
  46. package/dist/src/construct/site-with-ecs-backend/main.js +37 -2
  47. package/dist/src/construct/site-with-ecs-backend/types.d.ts +45 -0
  48. package/dist/src/construct/site-with-lambda-backend/constants.d.ts +8 -0
  49. package/dist/src/construct/site-with-lambda-backend/constants.js +8 -0
  50. package/dist/src/construct/site-with-lambda-backend/main.d.ts +31 -0
  51. package/dist/src/construct/site-with-lambda-backend/main.js +31 -2
  52. package/dist/src/construct/site-with-lambda-backend/types.d.ts +42 -0
  53. package/dist/src/construct/static-asset-deployment/main.d.ts +10 -0
  54. package/dist/src/construct/static-asset-deployment/main.js +10 -1
  55. package/dist/src/construct/static-asset-deployment/types.d.ts +14 -0
  56. package/dist/src/construct/static-site/main.d.ts +17 -0
  57. package/dist/src/construct/static-site/main.js +17 -2
  58. package/dist/src/construct/static-site/types.d.ts +18 -0
  59. package/dist/src/services/api-gateway/main.d.ts +20 -20
  60. package/dist/src/services/api-gateway/main.js +20 -20
  61. package/dist/src/services/api-gateway/types.d.ts +7 -0
  62. package/dist/src/services/appconfig/constants.d.ts +2 -2
  63. package/dist/src/services/appconfig/constants.js +2 -2
  64. package/dist/src/services/appconfig/main.d.ts +5 -5
  65. package/dist/src/services/appconfig/main.js +5 -5
  66. package/dist/src/services/appconfig/types.d.ts +11 -1
  67. package/dist/src/services/certificate-manager/types.d.ts +8 -0
  68. package/dist/src/services/cloudfront/main.d.ts +28 -28
  69. package/dist/src/services/cloudfront/main.js +28 -28
  70. package/dist/src/services/cloudfront/types.d.ts +8 -0
  71. package/dist/src/services/cloudwatch/logs.d.ts +4 -4
  72. package/dist/src/services/cloudwatch/logs.js +4 -4
  73. package/dist/src/services/cloudwatch/main.d.ts +24 -24
  74. package/dist/src/services/cloudwatch/main.js +25 -24
  75. package/dist/src/services/cloudwatch/types.d.ts +66 -0
  76. package/dist/src/services/dynamodb/main.d.ts +2 -2
  77. package/dist/src/services/dynamodb/main.js +2 -2
  78. package/dist/src/services/dynamodb/types.d.ts +8 -0
  79. package/dist/src/services/elastic-container-registry/main.d.ts +1 -1
  80. package/dist/src/services/elastic-container-registry/main.js +1 -1
  81. package/dist/src/services/elastic-container-service/main.d.ts +13 -13
  82. package/dist/src/services/elastic-container-service/main.js +16 -13
  83. package/dist/src/services/elastic-container-service/types.d.ts +30 -1
  84. package/dist/src/services/elastic-file-system/types.d.ts +9 -0
  85. package/dist/src/services/elastic-kubernetes-service/main.d.ts +3 -3
  86. package/dist/src/services/elastic-kubernetes-service/main.js +7 -3
  87. package/dist/src/services/elastic-kubernetes-service/types.d.ts +4 -0
  88. package/dist/src/services/elasticache/main.d.ts +14 -14
  89. package/dist/src/services/elasticache/main.js +18 -14
  90. package/dist/src/services/elasticache/types.d.ts +4 -0
  91. package/dist/src/services/eventbridge/main.d.ts +11 -11
  92. package/dist/src/services/eventbridge/main.js +19 -11
  93. package/dist/src/services/eventbridge/target.d.ts +5 -1
  94. package/dist/src/services/eventbridge/target.js +6 -1
  95. package/dist/src/services/eventbridge/types.d.ts +27 -1
  96. package/dist/src/services/evidently/types.d.ts +10 -0
  97. package/dist/src/services/identity-access-management/main.d.ts +42 -42
  98. package/dist/src/services/identity-access-management/main.js +42 -42
  99. package/dist/src/services/key-management-service/types.d.ts +2 -0
  100. package/dist/src/services/lambda/main.d.ts +25 -25
  101. package/dist/src/services/lambda/main.js +26 -25
  102. package/dist/src/services/lambda/types.d.ts +34 -0
  103. package/dist/src/services/route53/main.js +2 -0
  104. package/dist/src/services/route53/types.d.ts +3 -0
  105. package/dist/src/services/secrets-manager/main.js +2 -0
  106. package/dist/src/services/secrets-manager/types.d.ts +4 -0
  107. package/dist/src/services/simple-notification-service/types.d.ts +2 -0
  108. package/dist/src/services/simple-queue-service/main.js +2 -0
  109. package/dist/src/services/simple-queue-service/types.d.ts +11 -0
  110. package/dist/src/services/simple-storage-service/main.d.ts +1 -1
  111. package/dist/src/services/simple-storage-service/main.js +5 -1
  112. package/dist/src/services/simple-storage-service/types.d.ts +16 -0
  113. package/dist/src/services/step-function/types.d.ts +54 -0
  114. package/dist/src/services/systems-manager/main.d.ts +15 -4
  115. package/dist/src/services/systems-manager/main.js +17 -4
  116. package/dist/src/services/systems-manager/types.d.ts +8 -0
  117. package/dist/src/services/virtual-private-cloud/ipv6.d.ts +19 -1
  118. package/dist/src/services/virtual-private-cloud/ipv6.js +26 -1
  119. package/dist/src/services/virtual-private-cloud/main.js +1 -2
  120. package/dist/src/services/virtual-private-cloud/types.d.ts +5 -0
  121. package/dist/src/services/web-application-firewall/types.d.ts +4 -0
  122. package/dist/src/types/index.d.ts +3 -0
  123. package/dist/src/utils/index.d.ts +9 -3
  124. package/dist/src/utils/index.js +10 -3
  125. package/package.json +5 -5
@@ -6,7 +6,7 @@ import { IBucket } from 'aws-cdk-lib/aws-s3';
6
6
  import { Queue } from 'aws-cdk-lib/aws-sqs';
7
7
  import { CommonConstruct } from '../../common/index.js';
8
8
  /**
9
- * Provides operations on AWS
9
+ * Provides operations on AWS Identity and Access Management (IAM).
10
10
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
11
11
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
12
12
  * @example
@@ -72,7 +72,7 @@ export declare class IamManager {
72
72
  /**
73
73
  * @summary Method to create iam statement to list s3 buckets
74
74
  * @param scope scope in which this resource is defined
75
- * @param bucket
75
+ * @param bucket the S3 bucket to grant list access to
76
76
  */
77
77
  statementForListBucket(scope: CommonConstruct, bucket: IBucket): PolicyStatement;
78
78
  /**
@@ -83,22 +83,22 @@ export declare class IamManager {
83
83
  /**
84
84
  * @summary Method to create iam statement to get s3 objects in buckets
85
85
  * @param scope scope in which this resource is defined
86
- * @param bucket
87
- * @param resourceArns list of ARNs to allow access to
86
+ * @param bucket the S3 bucket to grant read access to
87
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
88
88
  */
89
89
  statementForGetAnyS3Objects(scope: CommonConstruct, bucket: IBucket, resourceArns?: string[]): PolicyStatement;
90
90
  /**
91
91
  * @summary Method to create iam statement to delete s3 objects in buckets
92
92
  * @param scope scope in which this resource is defined
93
- * @param bucket
94
- * @param resourceArns list of ARNs to allow access to
93
+ * @param bucket the S3 bucket to grant delete access to
94
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
95
95
  */
96
96
  statementForDeleteAnyS3Objects(scope: CommonConstruct, bucket: IBucket, resourceArns?: string[]): PolicyStatement;
97
97
  /**
98
98
  * @summary Method to create iam statement to write s3 objects in buckets
99
99
  * @param scope scope in which this resource is defined
100
- * @param bucket
101
- * @param resourceArns list of ARNs to allow access to
100
+ * @param bucket the S3 bucket to grant write access to
101
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
102
102
  */
103
103
  statementForPutAnyS3Objects(scope: CommonConstruct, bucket: IBucket, resourceArns?: string[]): PolicyStatement;
104
104
  /**
@@ -119,7 +119,7 @@ export declare class IamManager {
119
119
  /**
120
120
  * @summary Method to create iam statement to assume iam role
121
121
  * @param scope scope in which this resource is defined
122
- * @param servicePrincipals
122
+ * @param servicePrincipals the list of service principals allowed to assume the role
123
123
  */
124
124
  statementForAssumeRole(scope: CommonConstruct, servicePrincipals: ServicePrincipal[]): PolicyStatement;
125
125
  /**
@@ -130,14 +130,14 @@ export declare class IamManager {
130
130
  /**
131
131
  * @summary Method to create iam statement to run ecs task
132
132
  * @param scope scope in which this resource is defined
133
- * @param cluster
134
- * @param task
133
+ * @param cluster the ECS cluster the task runs in
134
+ * @param task the ECS task definition to allow running
135
135
  */
136
136
  statementForRunEcsTask(scope: CommonConstruct, cluster: ICluster, task: ITaskDefinition): PolicyStatement;
137
137
  /**
138
138
  * @summary Method to create iam statement to create log stream
139
139
  * @param scope scope in which this resource is defined
140
- * @param logGroup
140
+ * @param logGroup the CloudWatch log group to allow creating log streams in
141
141
  */
142
142
  statementForCreateLogStream(scope: CommonConstruct, logGroup: CfnLogGroup): PolicyStatement;
143
143
  /**
@@ -148,7 +148,7 @@ export declare class IamManager {
148
148
  /**
149
149
  * @summary Method to create iam statement to write log events
150
150
  * @param scope scope in which this resource is defined
151
- * @param logGroup
151
+ * @param logGroup the CloudWatch log group to allow writing log events to
152
152
  */
153
153
  statementForPutLogEvent(scope: CommonConstruct, logGroup: CfnLogGroup): PolicyStatement;
154
154
  /**
@@ -177,12 +177,12 @@ export declare class IamManager {
177
177
  */
178
178
  createPolicyForCloudfrontInvalidation(resourceArns?: string[]): PolicyDocument;
179
179
  /**
180
- * @summary Method to create iam policy for sqs
180
+ * @summary Method to create iam policy for SQS event processing
181
181
  * @param id scoped id of the resource
182
182
  * @param scope scope in which this resource is defined
183
- * @param sqsQueue
184
- * @param eventBridgeRule
185
- * @param servicePrincipals
183
+ * @param sqsQueue the SQS queue to grant access to
184
+ * @param eventBridgeRule the EventBridge rule that sends events to the queue
185
+ * @param servicePrincipals optional list of service principals, defaults to events.amazonaws.com
186
186
  */
187
187
  createPolicyForSqsEvent(id: string, scope: CommonConstruct, sqsQueue: Queue, eventBridgeRule: IRule, servicePrincipals?: ServicePrincipal[]): PolicyDocument;
188
188
  /**
@@ -192,73 +192,73 @@ export declare class IamManager {
192
192
  */
193
193
  createRoleForCloudfrontInvalidation(id: string, scope: CommonConstruct): Role;
194
194
  /**
195
- * @summary Method to create iam statement for cloud trail
195
+ * @summary Method to create iam role for CloudTrail
196
196
  * @param id scoped id of the resource
197
197
  * @param scope scope in which this resource is defined
198
- * @param logGroup
198
+ * @param logGroup the CloudWatch log group for CloudTrail to deliver logs to
199
199
  */
200
200
  createRoleForCloudTrail(id: string, scope: CommonConstruct, logGroup: CfnLogGroup): CfnRole;
201
201
  /**
202
- * @summary Method to create iam statement for ecs event
202
+ * @summary Method to create iam role for ECS event-driven task execution
203
203
  * @param id scoped id of the resource
204
204
  * @param scope scope in which this resource is defined
205
- * @param cluster
206
- * @param task
205
+ * @param cluster the ECS cluster the task runs in
206
+ * @param task the ECS task definition to allow running
207
207
  */
208
208
  createRoleForEcsEvent(id: string, scope: CommonConstruct, cluster: ICluster, task: ITaskDefinition): Role;
209
209
  /**
210
- * @summary Method to create iam statement for ecs execution
210
+ * @summary Method to create iam role for ECS task execution
211
211
  * @param id scoped id of the resource
212
212
  * @param scope scope in which this resource is defined
213
- * @param policy
213
+ * @param policy the inline policy document to attach to the role
214
214
  */
215
215
  createRoleForEcsExecution(id: string, scope: CommonConstruct, policy: PolicyDocument): Role;
216
216
  /**
217
- * @summary Method to create iam statement for lambda execution
217
+ * @summary Method to create iam role for Lambda function execution
218
218
  * @param id scoped id of the resource
219
219
  * @param scope scope in which this resource is defined
220
- * @param policy
221
- * @param servicePrincipal
220
+ * @param policy the inline policy document to attach to the role
221
+ * @param servicePrincipal optional service principal, defaults to lambda.amazonaws.com
222
222
  */
223
223
  createRoleForLambda(id: string, scope: CommonConstruct, policy: PolicyDocument, servicePrincipal?: ServicePrincipal): Role;
224
224
  /**
225
- * @summary Method to create iam statement for appconfig secrets manager integration
225
+ * @summary Method to create iam role for AppConfig Secrets Manager integration
226
226
  * @param id scoped id of the resource
227
227
  * @param scope scope in which this resource is defined
228
- * @param policy
229
- * @param servicePrincipal
228
+ * @param policy the inline policy document to attach to the role
229
+ * @param servicePrincipal optional service principal, defaults to appconfig.amazonaws.com
230
230
  */
231
231
  createRoleForAppConfigSecrets(id: string, scope: CommonConstruct, policy: PolicyDocument, servicePrincipal?: ServicePrincipal): Role;
232
232
  /**
233
- * @summary Method to create iam statement for step function execution
233
+ * @summary Method to create iam role for Step Function execution
234
234
  * @param id scoped id of the resource
235
235
  * @param scope scope in which this resource is defined
236
- * @param policy
237
- * @param servicePrincipal
236
+ * @param policy the inline policy document to attach to the role
237
+ * @param servicePrincipal optional service principal, defaults to states.amazonaws.com
238
238
  */
239
239
  createRoleForStepFunction(id: string, scope: CommonConstruct, policy: PolicyDocument, servicePrincipal?: ServicePrincipal): Role;
240
240
  /**
241
- * @summary Method to create iam statement for sqs to step function pipe
241
+ * @summary Method to create iam role for SQS to Step Function pipe
242
242
  * @param id scoped id of the resource
243
243
  * @param scope scope in which this resource is defined
244
- * @param queueArn the arn of the sqs queue
245
- * @param stepFunctionArn the arn of the step function
244
+ * @param queueArn the ARN of the SQS queue (source)
245
+ * @param stepFunctionArn the ARN of the Step Function (target)
246
246
  */
247
247
  createRoleForSqsToSfnPipe(id: string, scope: CommonConstruct, queueArn: string, stepFunctionArn: string): Role;
248
248
  /**
249
- * @summary Method to create iam statement for sqs to lambda pipe
249
+ * @summary Method to create iam role for SQS to Lambda pipe
250
250
  * @param id scoped id of the resource
251
251
  * @param scope scope in which this resource is defined
252
- * @param queueArn the arn of the sqs queue
253
- * @param lambdaArn the arn of the lambda function
252
+ * @param queueArn the ARN of the SQS queue (source)
253
+ * @param lambdaArn the ARN of the Lambda function (target)
254
254
  */
255
255
  createRoleForSqsToLambdaPipe(id: string, scope: CommonConstruct, queueArn: string, lambdaArn: string): Role;
256
256
  /**
257
- * @summary Method to create iam statement for dynamoDb to lambda function pipe
257
+ * @summary Method to create iam role for DynamoDB stream to Lambda function pipe
258
258
  * @param id scoped id of the resource
259
259
  * @param scope scope in which this resource is defined
260
- * @param dynamoDbStreamArn the arn of the dynamoDb Stream queue
261
- * @param lambdaFunctionArn the arn of the lambda function
260
+ * @param dynamoDbStreamArn the ARN of the DynamoDB stream (source)
261
+ * @param lambdaFunctionArn the ARN of the Lambda function (target)
262
262
  */
263
263
  createRoleForDynamoDbToLambdaPipe(id: string, scope: CommonConstruct, dynamoDbStreamArn: string, lambdaFunctionArn: string): Role;
264
264
  }
@@ -2,7 +2,7 @@ import { Stack } from 'aws-cdk-lib';
2
2
  import { CfnRole, Effect, ManagedPolicy, PolicyDocument, PolicyStatement, Role, ServicePrincipal, } from 'aws-cdk-lib/aws-iam';
3
3
  import { createCfnOutput } from '../../utils/index.js';
4
4
  /**
5
- * Provides operations on AWS
5
+ * Provides operations on AWS Identity and Access Management (IAM).
6
6
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
7
7
  * - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
8
8
  * @example
@@ -137,7 +137,7 @@ export class IamManager {
137
137
  /**
138
138
  * @summary Method to create iam statement to list s3 buckets
139
139
  * @param scope scope in which this resource is defined
140
- * @param bucket
140
+ * @param bucket the S3 bucket to grant list access to
141
141
  */
142
142
  statementForListBucket(scope, bucket) {
143
143
  return new PolicyStatement({
@@ -160,8 +160,8 @@ export class IamManager {
160
160
  /**
161
161
  * @summary Method to create iam statement to get s3 objects in buckets
162
162
  * @param scope scope in which this resource is defined
163
- * @param bucket
164
- * @param resourceArns list of ARNs to allow access to
163
+ * @param bucket the S3 bucket to grant read access to
164
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
165
165
  */
166
166
  statementForGetAnyS3Objects(scope, bucket, resourceArns) {
167
167
  return new PolicyStatement({
@@ -173,8 +173,8 @@ export class IamManager {
173
173
  /**
174
174
  * @summary Method to create iam statement to delete s3 objects in buckets
175
175
  * @param scope scope in which this resource is defined
176
- * @param bucket
177
- * @param resourceArns list of ARNs to allow access to
176
+ * @param bucket the S3 bucket to grant delete access to
177
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
178
178
  */
179
179
  statementForDeleteAnyS3Objects(scope, bucket, resourceArns) {
180
180
  return new PolicyStatement({
@@ -186,8 +186,8 @@ export class IamManager {
186
186
  /**
187
187
  * @summary Method to create iam statement to write s3 objects in buckets
188
188
  * @param scope scope in which this resource is defined
189
- * @param bucket
190
- * @param resourceArns list of ARNs to allow access to
189
+ * @param bucket the S3 bucket to grant write access to
190
+ * @param resourceArns optional list of ARNs to allow access to, defaults to all objects in the bucket
191
191
  */
192
192
  statementForPutAnyS3Objects(scope, bucket, resourceArns) {
193
193
  return new PolicyStatement({
@@ -232,7 +232,7 @@ export class IamManager {
232
232
  /**
233
233
  * @summary Method to create iam statement to assume iam role
234
234
  * @param scope scope in which this resource is defined
235
- * @param servicePrincipals
235
+ * @param servicePrincipals the list of service principals allowed to assume the role
236
236
  */
237
237
  statementForAssumeRole(scope, servicePrincipals) {
238
238
  return new PolicyStatement({
@@ -256,8 +256,8 @@ export class IamManager {
256
256
  /**
257
257
  * @summary Method to create iam statement to run ecs task
258
258
  * @param scope scope in which this resource is defined
259
- * @param cluster
260
- * @param task
259
+ * @param cluster the ECS cluster the task runs in
260
+ * @param task the ECS task definition to allow running
261
261
  */
262
262
  statementForRunEcsTask(scope, cluster, task) {
263
263
  return new PolicyStatement({
@@ -270,7 +270,7 @@ export class IamManager {
270
270
  /**
271
271
  * @summary Method to create iam statement to create log stream
272
272
  * @param scope scope in which this resource is defined
273
- * @param logGroup
273
+ * @param logGroup the CloudWatch log group to allow creating log streams in
274
274
  */
275
275
  statementForCreateLogStream(scope, logGroup) {
276
276
  return new PolicyStatement({
@@ -299,7 +299,7 @@ export class IamManager {
299
299
  /**
300
300
  * @summary Method to create iam statement to write log events
301
301
  * @param scope scope in which this resource is defined
302
- * @param logGroup
302
+ * @param logGroup the CloudWatch log group to allow writing log events to
303
303
  */
304
304
  statementForPutLogEvent(scope, logGroup) {
305
305
  return new PolicyStatement({
@@ -390,12 +390,12 @@ export class IamManager {
390
390
  });
391
391
  }
392
392
  /**
393
- * @summary Method to create iam policy for sqs
393
+ * @summary Method to create iam policy for SQS event processing
394
394
  * @param id scoped id of the resource
395
395
  * @param scope scope in which this resource is defined
396
- * @param sqsQueue
397
- * @param eventBridgeRule
398
- * @param servicePrincipals
396
+ * @param sqsQueue the SQS queue to grant access to
397
+ * @param eventBridgeRule the EventBridge rule that sends events to the queue
398
+ * @param servicePrincipals optional list of service principals, defaults to events.amazonaws.com
399
399
  */
400
400
  createPolicyForSqsEvent(id, scope, sqsQueue, eventBridgeRule, servicePrincipals) {
401
401
  return new PolicyDocument({
@@ -429,10 +429,10 @@ export class IamManager {
429
429
  });
430
430
  }
431
431
  /**
432
- * @summary Method to create iam statement for cloud trail
432
+ * @summary Method to create iam role for CloudTrail
433
433
  * @param id scoped id of the resource
434
434
  * @param scope scope in which this resource is defined
435
- * @param logGroup
435
+ * @param logGroup the CloudWatch log group for CloudTrail to deliver logs to
436
436
  */
437
437
  createRoleForCloudTrail(id, scope, logGroup) {
438
438
  const policy = new PolicyDocument({
@@ -455,11 +455,11 @@ export class IamManager {
455
455
  return role;
456
456
  }
457
457
  /**
458
- * @summary Method to create iam statement for ecs event
458
+ * @summary Method to create iam role for ECS event-driven task execution
459
459
  * @param id scoped id of the resource
460
460
  * @param scope scope in which this resource is defined
461
- * @param cluster
462
- * @param task
461
+ * @param cluster the ECS cluster the task runs in
462
+ * @param task the ECS task definition to allow running
463
463
  */
464
464
  createRoleForEcsEvent(id, scope, cluster, task) {
465
465
  const policy = new PolicyDocument({
@@ -476,10 +476,10 @@ export class IamManager {
476
476
  return role;
477
477
  }
478
478
  /**
479
- * @summary Method to create iam statement for ecs execution
479
+ * @summary Method to create iam role for ECS task execution
480
480
  * @param id scoped id of the resource
481
481
  * @param scope scope in which this resource is defined
482
- * @param policy
482
+ * @param policy the inline policy document to attach to the role
483
483
  */
484
484
  createRoleForEcsExecution(id, scope, policy) {
485
485
  const role = new Role(scope, `${id}`, {
@@ -496,11 +496,11 @@ export class IamManager {
496
496
  return role;
497
497
  }
498
498
  /**
499
- * @summary Method to create iam statement for lambda execution
499
+ * @summary Method to create iam role for Lambda function execution
500
500
  * @param id scoped id of the resource
501
501
  * @param scope scope in which this resource is defined
502
- * @param policy
503
- * @param servicePrincipal
502
+ * @param policy the inline policy document to attach to the role
503
+ * @param servicePrincipal optional service principal, defaults to lambda.amazonaws.com
504
504
  */
505
505
  createRoleForLambda(id, scope, policy, servicePrincipal) {
506
506
  const role = new Role(scope, `${id}`, {
@@ -517,11 +517,11 @@ export class IamManager {
517
517
  return role;
518
518
  }
519
519
  /**
520
- * @summary Method to create iam statement for appconfig secrets manager integration
520
+ * @summary Method to create iam role for AppConfig Secrets Manager integration
521
521
  * @param id scoped id of the resource
522
522
  * @param scope scope in which this resource is defined
523
- * @param policy
524
- * @param servicePrincipal
523
+ * @param policy the inline policy document to attach to the role
524
+ * @param servicePrincipal optional service principal, defaults to appconfig.amazonaws.com
525
525
  */
526
526
  createRoleForAppConfigSecrets(id, scope, policy, servicePrincipal) {
527
527
  const role = new Role(scope, `${id}`, {
@@ -535,11 +535,11 @@ export class IamManager {
535
535
  return role;
536
536
  }
537
537
  /**
538
- * @summary Method to create iam statement for step function execution
538
+ * @summary Method to create iam role for Step Function execution
539
539
  * @param id scoped id of the resource
540
540
  * @param scope scope in which this resource is defined
541
- * @param policy
542
- * @param servicePrincipal
541
+ * @param policy the inline policy document to attach to the role
542
+ * @param servicePrincipal optional service principal, defaults to states.amazonaws.com
543
543
  */
544
544
  createRoleForStepFunction(id, scope, policy, servicePrincipal) {
545
545
  const role = new Role(scope, `${id}`, {
@@ -556,11 +556,11 @@ export class IamManager {
556
556
  return role;
557
557
  }
558
558
  /**
559
- * @summary Method to create iam statement for sqs to step function pipe
559
+ * @summary Method to create iam role for SQS to Step Function pipe
560
560
  * @param id scoped id of the resource
561
561
  * @param scope scope in which this resource is defined
562
- * @param queueArn the arn of the sqs queue
563
- * @param stepFunctionArn the arn of the step function
562
+ * @param queueArn the ARN of the SQS queue (source)
563
+ * @param stepFunctionArn the ARN of the Step Function (target)
564
564
  */
565
565
  createRoleForSqsToSfnPipe(id, scope, queueArn, stepFunctionArn) {
566
566
  const role = new Role(scope, `${id}`, {
@@ -575,11 +575,11 @@ export class IamManager {
575
575
  return role;
576
576
  }
577
577
  /**
578
- * @summary Method to create iam statement for sqs to lambda pipe
578
+ * @summary Method to create iam role for SQS to Lambda pipe
579
579
  * @param id scoped id of the resource
580
580
  * @param scope scope in which this resource is defined
581
- * @param queueArn the arn of the sqs queue
582
- * @param lambdaArn the arn of the lambda function
581
+ * @param queueArn the ARN of the SQS queue (source)
582
+ * @param lambdaArn the ARN of the Lambda function (target)
583
583
  */
584
584
  createRoleForSqsToLambdaPipe(id, scope, queueArn, lambdaArn) {
585
585
  const role = new Role(scope, `${id}`, {
@@ -594,11 +594,11 @@ export class IamManager {
594
594
  return role;
595
595
  }
596
596
  /**
597
- * @summary Method to create iam statement for dynamoDb to lambda function pipe
597
+ * @summary Method to create iam role for DynamoDB stream to Lambda function pipe
598
598
  * @param id scoped id of the resource
599
599
  * @param scope scope in which this resource is defined
600
- * @param dynamoDbStreamArn the arn of the dynamoDb Stream queue
601
- * @param lambdaFunctionArn the arn of the lambda function
600
+ * @param dynamoDbStreamArn the ARN of the DynamoDB stream (source)
601
+ * @param lambdaFunctionArn the ARN of the Lambda function (target)
602
602
  */
603
603
  createRoleForDynamoDbToLambdaPipe(id, scope, dynamoDbStreamArn, lambdaFunctionArn) {
604
604
  const role = new Role(scope, `${id}`, {
@@ -1,5 +1,7 @@
1
1
  import { KeyProps } from 'aws-cdk-lib/aws-kms';
2
2
  /**
3
+ * Properties for creating a KMS encryption key.
4
+ * @see {@link KeyProps}
3
5
  */
4
6
  /** @category Interface */
5
7
  export interface KmsKeyProps extends KeyProps {
@@ -27,8 +27,8 @@ export declare class LambdaManager {
27
27
  * @summary Method to create a lambda layer (nodejs)
28
28
  * @param id scoped id of the resource
29
29
  * @param scope scope in which this resource is defined
30
- * @param code
31
- * @param architectures
30
+ * @param code the asset code for the layer
31
+ * @param architectures optional list of compatible architectures, defaults to ARM_64
32
32
  */
33
33
  createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode, architectures?: Architecture[]): LayerVersion;
34
34
  /**
@@ -41,17 +41,17 @@ export declare class LambdaManager {
41
41
  * @summary Method to create a lambda function (nodejs)
42
42
  * @param id scoped id of the resource
43
43
  * @param scope scope in which this resource is defined
44
- * @param props
45
- * @param role
46
- * @param layers
47
- * @param code
48
- * @param handler
49
- * @param environment
50
- * @param vpc
51
- * @param securityGroups
52
- * @param accessPoint
53
- * @param mountPath
54
- * @param vpcSubnets
44
+ * @param props the Lambda function properties
45
+ * @param role the IAM role for the function execution
46
+ * @param layers the list of Lambda layers to attach
47
+ * @param code the asset code for the function
48
+ * @param handler optional handler entry point, defaults to 'index.lambda_handler'
49
+ * @param environment optional environment variables to inject
50
+ * @param vpc optional VPC to place the function in
51
+ * @param securityGroups optional security groups when running in a VPC
52
+ * @param accessPoint optional EFS access point for file system mounting
53
+ * @param mountPath optional mount path for the EFS file system, defaults to '/mnt/msg'
54
+ * @param vpcSubnets optional subnet selection when running in a VPC
55
55
  */
56
56
  createLambdaFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: Role | CfnRole, layers: ILayerVersion[], code: AssetCode, handler?: string, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string, vpcSubnets?: SubnetSelection): Function;
57
57
  /**
@@ -73,23 +73,23 @@ export declare class LambdaManager {
73
73
  * @summary Method to create a lambda function (nodejs) with docker image
74
74
  * @param id scoped id of the resource
75
75
  * @param scope scope in which this resource is defined
76
- * @param props
77
- * @param role
78
- * @param code
79
- * @param environment
80
- * @param vpc
81
- * @param securityGroups
82
- * @param accessPoint
83
- * @param mountPath
84
- * @param vpcSubnets
76
+ * @param props the Lambda function properties
77
+ * @param role the IAM role for the function execution
78
+ * @param code the Docker image code for the function
79
+ * @param environment optional environment variables to inject
80
+ * @param vpc optional VPC to place the function in
81
+ * @param securityGroups optional security groups when running in a VPC
82
+ * @param accessPoint optional EFS access point for file system mounting
83
+ * @param mountPath optional mount path for the EFS file system, defaults to '/mnt/msg'
84
+ * @param vpcSubnets optional subnet selection when running in a VPC
85
85
  */
86
86
  createLambdaDockerFunction(id: string, scope: CommonConstruct, props: LambdaProps, role: Role | CfnRole, code: DockerImageCode, environment?: any, vpc?: IVpc, securityGroups?: ISecurityGroup[], accessPoint?: IAccessPoint, mountPath?: string, vpcSubnets?: SubnetSelection): DockerImageFunction;
87
87
  /**
88
- * @summary Method to create a lambda function Alias
88
+ * @summary Method to create a lambda function alias
89
89
  * @param id scoped id of the resource
90
90
  * @param scope scope in which this resource is defined
91
- * @param props
92
- * @param lambdaVersion
91
+ * @param props the Lambda alias properties
92
+ * @param lambdaVersion the Lambda function version to point the alias to
93
93
  */
94
94
  createLambdaFunctionAlias(id: string, scope: CommonConstruct, props: LambdaAliasProps, lambdaVersion: IVersion): Alias;
95
95
  }
@@ -28,8 +28,8 @@ export class LambdaManager {
28
28
  * @summary Method to create a lambda layer (nodejs)
29
29
  * @param id scoped id of the resource
30
30
  * @param scope scope in which this resource is defined
31
- * @param code
32
- * @param architectures
31
+ * @param code the asset code for the layer
32
+ * @param architectures optional list of compatible architectures, defaults to ARM_64
33
33
  */
34
34
  createLambdaLayer(id, scope, code, architectures) {
35
35
  const lambdaLayer = new LayerVersion(scope, `${id}`, {
@@ -57,17 +57,17 @@ export class LambdaManager {
57
57
  * @summary Method to create a lambda function (nodejs)
58
58
  * @param id scoped id of the resource
59
59
  * @param scope scope in which this resource is defined
60
- * @param props
61
- * @param role
62
- * @param layers
63
- * @param code
64
- * @param handler
65
- * @param environment
66
- * @param vpc
67
- * @param securityGroups
68
- * @param accessPoint
69
- * @param mountPath
70
- * @param vpcSubnets
60
+ * @param props the Lambda function properties
61
+ * @param role the IAM role for the function execution
62
+ * @param layers the list of Lambda layers to attach
63
+ * @param code the asset code for the function
64
+ * @param handler optional handler entry point, defaults to 'index.lambda_handler'
65
+ * @param environment optional environment variables to inject
66
+ * @param vpc optional VPC to place the function in
67
+ * @param securityGroups optional security groups when running in a VPC
68
+ * @param accessPoint optional EFS access point for file system mounting
69
+ * @param mountPath optional mount path for the EFS file system, defaults to '/mnt/msg'
70
+ * @param vpcSubnets optional subnet selection when running in a VPC
71
71
  */
72
72
  createLambdaFunction(id, scope, props, role, layers, code, handler, environment, vpc, securityGroups, accessPoint, mountPath, vpcSubnets) {
73
73
  if (!props)
@@ -167,15 +167,15 @@ export class LambdaManager {
167
167
  * @summary Method to create a lambda function (nodejs) with docker image
168
168
  * @param id scoped id of the resource
169
169
  * @param scope scope in which this resource is defined
170
- * @param props
171
- * @param role
172
- * @param code
173
- * @param environment
174
- * @param vpc
175
- * @param securityGroups
176
- * @param accessPoint
177
- * @param mountPath
178
- * @param vpcSubnets
170
+ * @param props the Lambda function properties
171
+ * @param role the IAM role for the function execution
172
+ * @param code the Docker image code for the function
173
+ * @param environment optional environment variables to inject
174
+ * @param vpc optional VPC to place the function in
175
+ * @param securityGroups optional security groups when running in a VPC
176
+ * @param accessPoint optional EFS access point for file system mounting
177
+ * @param mountPath optional mount path for the EFS file system, defaults to '/mnt/msg'
178
+ * @param vpcSubnets optional subnet selection when running in a VPC
179
179
  */
180
180
  createLambdaDockerFunction(id, scope, props, role, code, environment, vpc, securityGroups, accessPoint, mountPath, vpcSubnets) {
181
181
  if (!props)
@@ -183,6 +183,7 @@ export class LambdaManager {
183
183
  if (!props.functionName)
184
184
  throw new Error(`Lambda functionName undefined for ${id}`);
185
185
  const functionName = scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.lambdaFunction);
186
+ /* Optionally provision a dead letter queue with a redrive queue for failed invocations */
186
187
  let deadLetterQueue;
187
188
  if (props.deadLetterQueueEnabled) {
188
189
  const redriveQueue = scope.sqsManager.createRedriveQueueForLambda(`${id}-rdq`, scope, props);
@@ -225,11 +226,11 @@ export class LambdaManager {
225
226
  return lambdaFunction;
226
227
  }
227
228
  /**
228
- * @summary Method to create a lambda function Alias
229
+ * @summary Method to create a lambda function alias
229
230
  * @param id scoped id of the resource
230
231
  * @param scope scope in which this resource is defined
231
- * @param props
232
- * @param lambdaVersion
232
+ * @param props the Lambda alias properties
233
+ * @param lambdaVersion the Lambda function version to point the alias to
233
234
  */
234
235
  createLambdaFunctionAlias(id, scope, props, lambdaVersion) {
235
236
  if (!props)