Skip to content

feat(lambda-events): add Control Tower lifecycle events module#1107

Open
martinjlowm wants to merge 1 commit intoaws:mainfrom
martinjlowm:main
Open

feat(lambda-events): add Control Tower lifecycle events module#1107
martinjlowm wants to merge 1 commit intoaws:mainfrom
martinjlowm:main

Conversation

@martinjlowm
Copy link
Contributor

@martinjlowm martinjlowm commented Feb 25, 2026

✍️ Description of changes:

Adds a controltower module to aws_lambda_events covering all 13 AWS Control Tower lifecycle events delivered via EventBridge as CloudTrail service events.

Events covered:

  • CreateManagedAccount / UpdateManagedAccount
  • EnableGuardrail / DisableGuardrail
  • SetupLandingZone / UpdateLandingZone
  • RegisterOrganizationalUnit / DeregisterOrganizationalUnit
  • PrecheckOrganizationalUnit
  • EnableBaseline / ResetEnabledBaseline / UpdateEnabledBaseline / DisableBaseline

The ServiceEventDetails enum uses serde's externally-tagged representation to match the serviceEventDetails JSON structure where the key name identifies the event type.

Usage with the CloudWatchEvent or EventBridgeEvent envelope:

    let event: CloudWatchEvent<ControlTowerLifecycleEvent> =
        serde_json::from_slice(data)?;

🔏 By submitting this pull request

  • I confirm that I've ran cargo +nightly fmt.
  • I confirm that I've ran cargo clippy --fix.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
  • I confirm that my contribution is made under the terms of the Apache 2.0 license.

Add a `controltower` module to `aws_lambda_events` covering all 13 AWS
Control Tower lifecycle events delivered via EventBridge as CloudTrail
service events.

Events covered:
- CreateManagedAccount / UpdateManagedAccount
- EnableGuardrail / DisableGuardrail
- SetupLandingZone / UpdateLandingZone
- RegisterOrganizationalUnit / DeregisterOrganizationalUnit
- PrecheckOrganizationalUnit
- EnableBaseline / ResetEnabledBaseline / UpdateEnabledBaseline / DisableBaseline

The `ServiceEventDetails` enum uses serde's externally-tagged
representation to match the `serviceEventDetails` JSON structure where
the key name identifies the event type.

Usage with the CloudWatchEvent or EventBridgeEvent envelope:

```
    let event: CloudWatchEvent<ControlTowerLifecycleEvent> =
        serde_json::from_slice(data)?;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant