Skip to content

Commit

Permalink
add default documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed Mar 6, 2024
1 parent 6c9063b commit 879f6b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/aws-cdk-lib/aws-events-targets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ rule.addTarget(new targets.CloudWatchLogGroup(logGroup, {
}));
```

The cloudwatch log event target will create an AWS custom resource internally which will default
to set `installLatestAwsSdk` to `true`. This may be problematic for CN partition deployment. To
workaround this issue, set `installLatestAwsSdk` to `false`.

```ts
import * as logs from 'aws-cdk-lib/aws-logs';
declare const logGroup: logs.LogGroup;
declare const rule: events.Rule;

rule.addTarget(new targets.CloudWatchLogGroup(logGroup, {
installLatestAwsSdk: false,
}));
```

## Start a CodeBuild build

Use the `CodeBuildProject` target to trigger a CodeBuild project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export interface LogGroupResourcePolicyProps {
readonly policyStatements: [iam.PolicyStatement];
/**
* Whether to install latest AWS SDK for the custom resource
*
* @default - install latest AWS SDK
*/
readonly installLatestAwsSdk?: boolean;
}
Expand Down

0 comments on commit 879f6b1

Please sign in to comment.