Skip to content

Commit e727a9a

Browse files
authored
docs(custom-resources): clarify that AwsCustomResource uses SingletonFunction (#19358)
Resolves #19309 Please suggest revisions if more clarification is needed or the language isn't clear/correct. Definitely resolves my confusion as stated in the linked issue! ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c8cafef commit e727a9a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export interface AwsCustomResourceProps {
263263
readonly policy: AwsCustomResourcePolicy;
264264

265265
/**
266-
* The execution role for the Lambda function implementing this custom
266+
* The execution role for the singleton Lambda function implementing this custom
267267
* resource provider. This role will apply to all `AwsCustomResource`
268268
* instances in the stack. The role must be assumable by the
269269
* `lambda.amazonaws.com` service principal.
@@ -273,14 +273,14 @@ export interface AwsCustomResourceProps {
273273
readonly role?: iam.IRole;
274274

275275
/**
276-
* The timeout for the Lambda function implementing this custom resource.
276+
* The timeout for the singleton Lambda function implementing this custom resource.
277277
*
278278
* @default Duration.minutes(2)
279279
*/
280280
readonly timeout?: cdk.Duration
281281

282282
/**
283-
* The number of days log events of the Lambda function implementing
283+
* The number of days log events of the singleton Lambda function implementing
284284
* this custom resource are kept in CloudWatch Logs.
285285
*
286286
* @default logs.RetentionDays.INFINITE
@@ -298,7 +298,8 @@ export interface AwsCustomResourceProps {
298298
readonly installLatestAwsSdk?: boolean;
299299

300300
/**
301-
* A name for the Lambda function implementing this custom resource.
301+
* A name for the singleton Lambda function implementing this custom resource.
302+
* The function name will remain the same after the first AwsCustomResource is created in a stack.
302303
*
303304
* @default - AWS CloudFormation generates a unique physical ID and uses that
304305
* ID for the function's name. For more information, see Name Type.
@@ -307,7 +308,8 @@ export interface AwsCustomResourceProps {
307308
}
308309

309310
/**
310-
* Defines a custom resource that is materialized using specific AWS API calls.
311+
* Defines a custom resource that is materialized using specific AWS API calls. These calls are created using
312+
* a singleton Lambda function.
311313
*
312314
* Use this to bridge any gap that might exist in the CloudFormation Coverage.
313315
* You can specify exactly which calls are invoked for the 'CREATE', 'UPDATE' and 'DELETE' life cycle events.

0 commit comments

Comments
 (0)