Fix event duplication And Remove Server access logs when archiving to bucket #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix logger info format error in lambda
Duplicate Event Reason:
From the cloud watch log about this func, we have error in
logger.info
, and the error isError storing event: not all arguments converted during string formatting
, this may come the%s
is a placeholder that expects a string to replace in the info.And this error will trigger retry function in our setting. Retry 3 times will generate 3 copy of the events.
As I check around for our could trail events, we may not need the to retain the server access logs for event archiver bucket, as the main purpose for this bucket is to "archive" already, and serve for event statistic and analysis.
PS: add cdk-nag Suppressions for unit testing error for the s3 bucket:
["AwsSolutions-S1: The S3 Bucket has server access logs disabled. [/SharedStack/EventBusConstruct/UniversalEventArchiveBucket/Resource]"]