-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(events): archive events #12060
feat(events): archive events #12060
Conversation
Hi @shivlaks , any chance I could get a review for this ? Thanks ! |
…orted by cloudformation latest version
*/ | ||
public abstract readonly eventSourceName?: string; | ||
|
||
public archive(props: BaseArchiveProps): Archive { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please still add the id
parameter.
public archive(props: BaseArchiveProps): Archive { | ||
return new Archive(this, 'Archive', { | ||
sourceEventBus: this, | ||
description: props.description || Lazy.string({ produce: () => `Event Archive for ${this.eventBusName} Event Bus` }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be a Lazy.
eventBusName: 'MyCustomEventBus' | ||
}); | ||
|
||
bus.archive( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example needs braces { ... }
.
sourceArn: props.sourceEventBus.eventBusArn, | ||
description: props.description, | ||
eventPattern: props.eventPattern, | ||
retentionDays: props.retention?.toDays() || 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to pass { integral: true }
to toDays()
otherwise it may lead to values like 0.5
.
Pull request has been modified.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Add the possibility to archive events from an Event Bus. It's also possible to archive specific events by passing an event patterns. See the following blogpost for more information about event archiving and replay.
Archiving should be possible from an imported EventBus.
closes #11531
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license