Skip to content

Commit a3ed44c

Browse files
committed
added comments of required eventBridgeEnabled property
1 parent d82f194 commit a3ed44c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

source/patterns/@aws-solutions-constructs/aws-s3-step-function/test/integ.pre-existing-bucket.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
import { App, Stack, RemovalPolicy } from "@aws-cdk/core";
1616
import { S3ToStepFunction, S3ToStepFunctionProps } from "../lib";
1717
import * as stepfunctions from '@aws-cdk/aws-stepfunctions';
18-
import { CreateScrapBucket } from '@aws-solutions-constructs/core';
19-
import { generateIntegStackName, addCfnNagS3BucketNotificationRulesToSuppress } from '@aws-solutions-constructs/core';
18+
import { CreateScrapBucket, generateIntegStackName, addCfnNagS3BucketNotificationRulesToSuppress } from '@aws-solutions-constructs/core';
2019

2120
const app = new App();
2221
const stack = new Stack(app, generateIntegStackName(__filename));

source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ new S3ToStepfunctions(this, "test_s3_stepfunctions_stack",
8787

8888
| **Name** | **Type** | **Description** |
8989
|:-------------|:----------------|-----------------|
90-
|existingBucketObj?|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.IBucket.html)|Existing instance of S3 Bucket object. The existing bucket must have [EventBridge enabled](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications-eventbridge.html) for this to work. If this is provided, then also providing bucketProps is an error.|
90+
|existingBucketObj?|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.IBucket.html)|Existing instance of S3 Bucket object. If this is provided, then also providing bucketProps is an error. **The existing bucket must have [EventBridge enabled](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications-eventbridge.html) for this to work.**|
9191
|bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|Optional user provided props to override the default props for the S3 Bucket.|
9292
|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-stepfunctions.StateMachineProps.html)|User provided props to override the default props for sfn.StateMachine.|
9393
|eventRuleProps?|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.RuleProps.html)|Optional user provided eventRuleProps to override the defaults.|

source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/lib/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ import * as logs from '@aws-cdk/aws-logs';
2727
export interface S3ToStepfunctionsProps {
2828
/**
2929
* Existing instance of S3 Bucket object, providing both this and `bucketProps` will cause an error.
30+
* The Amazon EventBridge property must be enabled in the existing bucket for the construct to work.
3031
*
3132
* @default - None
3233
*/
3334
readonly existingBucketObj?: s3.IBucket,
3435
/**
3536
* Optional user provided props to override the default props for the S3 Bucket.
3637
*
37-
* @default - Default props are usedÎ
38+
* @default - Default props are used
3839
*/
3940
readonly bucketProps?: s3.BucketProps,
4041
/**
@@ -110,7 +111,7 @@ export class S3ToStepfunctions extends Construct {
110111

111112
if (!props.existingBucketObj) {
112113
[this.s3Bucket, this.s3LoggingBucket] = defaults.buildS3Bucket(this, {
113-
bucketProps: defaults.consolidateProps({ eventBridgeEnabled: true }, props.bucketProps),
114+
bucketProps: defaults.consolidateProps({}, props.bucketProps, { eventBridgeEnabled: true }),
114115
loggingBucketProps: props.loggingBucketProps,
115116
logS3AccessLogs: props.logS3AccessLogs
116117
});

0 commit comments

Comments
 (0)