From 773406c3185287733f45e876248c6ba5b59f4904 Mon Sep 17 00:00:00 2001 From: mickychetta Date: Mon, 13 Sep 2021 16:49:21 -0700 Subject: [PATCH] added comments to explain new wrapped construct name --- .../lib/index.ts | 5 +++++ .../aws-dynamodb-stream-lambda/lib/index.ts | 7 ++++++- .../aws-events-rule-kinesisfirehose-s3/lib/index.ts | 5 +++++ .../aws-events-rule-kinesisstreams/lib/index.ts | 5 +++++ .../aws-events-rule-lambda/lib/index.ts | 5 +++++ .../aws-events-rule-sns/lib/index.ts | 5 +++++ .../aws-events-rule-sqs/lib/index.ts | 5 +++++ .../aws-events-rule-step-function/lib/index.ts | 5 +++++ .../aws-lambda-step-function/lib/index.ts | 5 +++++ .../aws-s3-step-function/lib/index.ts | 5 +++++ 10 files changed, 51 insertions(+), 1 deletion(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda-elasticsearch-kibana/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda-elasticsearch-kibana/lib/index.ts index 3c37b0d42..4260be03b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda-elasticsearch-kibana/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda-elasticsearch-kibana/lib/index.ts @@ -117,6 +117,11 @@ export class DynamoDBStreamToLambdaToElasticSearchAndKibana extends Construct { constructor(scope: Construct, id: string, props: DynamoDBStreamToLambdaToElasticSearchAndKibanaProps) { super(scope, id); const convertedProps: DynamoDBStreamToLambdaToElasticSearchAndKibanaProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new DynamoDBStreamsToLambdaToElasticSearchAndKibana instead of DynamoDBStreamToLambdaToElasticSearchAndKibana) const wrappedConstruct: DynamoDBStreamToLambdaToElasticSearchAndKibana = new DynamoDBStreamsToLambdaToElasticSearchAndKibana( this, `${id}W`, convertedProps); diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda/lib/index.ts index 2a63a7544..5fc95078c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda/lib/index.ts @@ -83,7 +83,12 @@ export class DynamoDBStreamToLambda extends Construct { constructor(scope: Construct, id: string, props: DynamoDBStreamToLambdaProps) { super(scope, id); const convertedProps: DynamoDBStreamToLambdaProps = { ...props }; - const wrappedConstruct: DynamoDBStreamToLambda = new DynamoDBStreamsToLambda(this, `${id}W`, convertedProps); + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToLambda instead of DynamoDBStreamToLambda) + const wrappedConstruct: DynamoDBStreamsToLambda = new DynamoDBStreamsToLambda(this, `${id}W`, convertedProps); this.lambdaFunction = wrappedConstruct.lambdaFunction; this.dynamoTableInterface = wrappedConstruct.dynamoTableInterface; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3/lib/index.ts index 65ee44362..686e974bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3/lib/index.ts @@ -88,6 +88,11 @@ export class EventsRuleToKinesisFirehoseToS3 extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToKinesisFirehoseToS3Props) { super(scope, id); const convertedProps: EventsRuleToKinesisFirehoseToS3Props = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToKinesisFirehoseToS3 instead of EventsRuleToKinesisFirehoseToS3) const wrappedConstruct: EventsRuleToKinesisFirehoseToS3 = new EventbridgeToKinesisFirehoseToS3(this, `${id}W`, convertedProps); this.eventsRule = wrappedConstruct.eventsRule; this.eventsRole = wrappedConstruct.eventsRole; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisstreams/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisstreams/lib/index.ts index 658f78f99..5a674b3fb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisstreams/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-kinesisstreams/lib/index.ts @@ -78,6 +78,11 @@ export class EventsRuleToKinesisStreams extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToKinesisStreamsProps) { super(scope, id); const convertedProps: EventsRuleToKinesisStreamsProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToKinesisStreams instead of EventsRuleToKinesisStreams) const wrappedConstruct: EventsRuleToKinesisStreams = new EventbridgeToKinesisStreams(this, `${id}W`, convertedProps); this.kinesisStream = wrappedConstruct.kinesisStream; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-lambda/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-lambda/lib/index.ts index 4af5a79e3..d0d22aa53 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-lambda/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-lambda/lib/index.ts @@ -68,6 +68,11 @@ export class EventsRuleToLambda extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToLambdaProps) { super(scope, id); const convertedProps: EventsRuleToLambdaProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToLambda instead of EventsRuleToLambda) const wrappedConstruct: EventsRuleToLambda = new EventbridgeToLambda(this, `${id}W`, convertedProps); this.lambdaFunction = wrappedConstruct.lambdaFunction; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts index c28bb8fe8..4b91920a1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-sns/lib/index.ts @@ -86,6 +86,11 @@ export class EventsRuleToSns extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToSnsProps) { super(scope, id); const convertedProps: EventsRuleToSnsProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToSns instead of EventsRuleToSns) const wrappedConstruct: EventsRuleToSns = new EventbridgeToSns(this, `${id}`, convertedProps); this.snsTopic = wrappedConstruct.snsTopic; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-sqs/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-sqs/lib/index.ts index d6fa11265..033392c77 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-sqs/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-sqs/lib/index.ts @@ -115,6 +115,11 @@ export class EventsRuleToSqs extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToSqsProps) { super(scope, id); const convertedProps: EventsRuleToSqsProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToSqs instead of EventsRuleToSqs) const wrappedConstruct: EventsRuleToSqs = new EventbridgeToSqs(this, `${id}W`, convertedProps); this.sqsQueue = wrappedConstruct.sqsQueue; diff --git a/source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/lib/index.ts index 3345f5014..4882799a3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/lib/index.ts @@ -78,6 +78,11 @@ export class EventsRuleToStepFunction extends Construct { constructor(scope: Construct, id: string, props: EventsRuleToStepFunctionProps) { super(scope, id); const convertedProps: EventsRuleToStepFunctionProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new EventbridgeToStepfunctions instead of EventsRuleToStepFunction) const wrappedConstruct: EventsRuleToStepFunction = new EventbridgeToStepfunctions(this, `${id}W`, convertedProps); this.stateMachine = wrappedConstruct.stateMachine; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-step-function/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-step-function/lib/index.ts index 359eae8d4..3684d55fa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-step-function/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-step-function/lib/index.ts @@ -98,6 +98,11 @@ export class LambdaToStepFunction extends Construct { constructor(scope: Construct, id: string, props: LambdaToStepFunctionProps) { super(scope, id); const convertedProps: LambdaToStepFunctionProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new LambdaToStepfunctions instead of LambdaToStepFunction) const wrappedConstruct: LambdaToStepFunction = new LambdaToStepfunctions(this, `${id}W`, convertedProps); this.lambdaFunction = wrappedConstruct.lambdaFunction; diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-step-function/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-s3-step-function/lib/index.ts index 88e8e83a9..60c116831 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-step-function/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-step-function/lib/index.ts @@ -89,6 +89,11 @@ export class S3ToStepFunction extends Construct { constructor(scope: Construct, id: string, props: S3ToStepFunctionProps) { super(scope, id); const convertedProps: S3ToStepFunctionProps = { ...props }; + + // W (for 'wrapped') is added to the id so that the id's of the constructs with the old and new names don't collide + // If this character pushes you beyond the 64 character limit, just import the new named construct and instantiate + // it in place of the older named version. They are functionally identical, aside from the types no other changes + // will be required. (eg - new S3ToStepfunctions instead of S3ToStepFunction) const wrappedConstruct: S3ToStepFunction = new S3ToStepfunctions(this, `${id}W`, convertedProps); this.stateMachine = wrappedConstruct.stateMachine;