feat(rds): emit aws.rds EventBridge events on lifecycle ops#735
Merged
vieiralucas merged 2 commits intomainfrom Apr 24, 2026
Merged
feat(rds): emit aws.rds EventBridge events on lifecycle ops#735vieiralucas merged 2 commits intomainfrom
vieiralucas merged 2 commits intomainfrom
Conversation
DB instance and snapshot lifecycle ops now emit `aws.rds` events on the default EventBridge bus, matching the AWS event schema. EventBridge rules can match on source/detail-type and route to SQS, SNS, Lambda, or any other supported target. Wired ops: - CreateDBInstance -> RDS-EVENT-0005 - DeleteDBInstance -> RDS-EVENT-0003 - ModifyDBInstance -> RDS-EVENT-0014 - RebootDBInstance -> RDS-EVENT-0006 - StartDBInstance -> RDS-EVENT-0088 - StopDBInstance -> RDS-EVENT-0089 - CreateDBInstanceReadReplica -> RDS-EVENT-0005 (read replica) - RestoreDBInstanceFromDBSnapshot -> RDS-EVENT-0043 - CreateDBSnapshot -> RDS-EVENT-0042 - DeleteDBSnapshot -> RDS-EVENT-0041 Closes the gap noted in the integrations audit: RDS captured ops but never emitted the corresponding `aws.rds` events real AWS users rely on for downstream automation.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/fakecloud-server/src/main.rs">
<violation number="1" location="crates/fakecloud-server/src/main.rs:1681">
P2: RDS EventBridge delivery is wired without an SNS sender, so SNS rule targets for `aws.rds` events are never delivered.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Cubic flagged that the inner DeliveryBus passed to the RDS-side EventBridge dispatcher only had SQS, so `aws.rds` events targeting an SNS topic via an EB rule never got published. Adds the SNS sender clone and an SNS-target E2E test to lock in the behavior.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes the first gap from the integrations audit: RDS now emits
aws.rdsevents on the default EventBridge bus when DB instances and snapshots transition state, matching the AWS event schema. Rules can match onsource/detail-typeand route to SQS, SNS, Lambda, or any supported target.Events emitted:
CreateDBInstanceDeleteDBInstanceModifyDBInstanceRebootDBInstanceStartDBInstanceStopDBInstanceCreateDBInstanceReadReplicaRestoreDBInstanceFromDBSnapshotCreateDBSnapshotDeleteDBSnapshotTest plan
crates/fakecloud-rds/src/service.rscover the emit path with a recordingEventBridgeDeliverymockcrates/fakecloud-e2e/tests/rds_eventbridge.rsexercise StartDBInstance / StopDBInstance through real EB rule matching to an SQS target (no docker required, runs on every CI shard)cargo clippy --workspace --all-targets -- -D warningscleancargo fmt --checkcleanSummary by cubic
RDS now emits
aws.rdsEventBridge events for DB instance and snapshot lifecycle operations, matching the AWS event schema. Rules on the default bus can route to SQS, SNS, Lambda, and other targets; SNS delivery via rules is now wired and tested.RdsServiceto aDeliveryBusthat forwards to EventBridge and downstream SQS/SNS targets (no-op when not configured); added E2E tests (Start/Stop -> SQS, Start -> SNS) and unit tests with a recording delivery; updated RDS and integration docs.Written for commit 174a8a3. Summary will update on new commits.