Skip to content

Commit 879f6b1

Browse files
committed
add default documentation
1 parent 6c9063b commit 879f6b1

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

packages/aws-cdk-lib/aws-events-targets/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,20 @@ rule.addTarget(new targets.CloudWatchLogGroup(logGroup, {
120120
}));
121121
```
122122

123+
The cloudwatch log event target will create an AWS custom resource internally which will default
124+
to set `installLatestAwsSdk` to `true`. This may be problematic for CN partition deployment. To
125+
workaround this issue, set `installLatestAwsSdk` to `false`.
126+
127+
```ts
128+
import * as logs from 'aws-cdk-lib/aws-logs';
129+
declare const logGroup: logs.LogGroup;
130+
declare const rule: events.Rule;
131+
132+
rule.addTarget(new targets.CloudWatchLogGroup(logGroup, {
133+
installLatestAwsSdk: false,
134+
}));
135+
```
136+
123137
## Start a CodeBuild build
124138

125139
Use the `CodeBuildProject` target to trigger a CodeBuild project.

packages/aws-cdk-lib/aws-events-targets/lib/log-group-resource-policy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export interface LogGroupResourcePolicyProps {
1717
readonly policyStatements: [iam.PolicyStatement];
1818
/**
1919
* Whether to install latest AWS SDK for the custom resource
20+
*
21+
* @default - install latest AWS SDK
2022
*/
2123
readonly installLatestAwsSdk?: boolean;
2224
}

0 commit comments

Comments
 (0)