-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(events-targets): cloudwatch logs requires specific input template (…
…#20748) The CloudWatch logs log group target requires a very specific input template. It does not support `input` or `inputPath` and if `inputTemplate` is specified it must be in the format of `{"timestamp": <time>, "message": <message>}` where both the values for `timestamp` and `message` are strings. This requirement is not very well documented, the only reference I could find is in a `Note` on this [page](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html). This PR adds a new property `logEvent` and deprecates the `event` property to ensure that if the user adds an event input that it uses the correct format. While working on this PR is started by adding some validation if the user provides the `event` property and then went down the route of providing the new `logEvent` property. Since I already did the work of creating the validation for `event` I've kept it, but I'm open to just removing that logic since it is validating a `deprecated` property. I've also added an integration test that asserts that the expected message is written to the log group. fixes #19451 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
14 changed files
with
1,886 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.