Plug into Secrets Manager lifecycle events using AWS CloudTrail and AWS EventBridge
Leverage AWS EventBridge using CloudTrail to filtering on Secret Manager lifecycle events.
scripts
: Contains 2 smallzx
helper scripts to perform an operation in Secrets Manager.infra
: Contains a AWS CDK project containing the infrastructure for the solution.
cdk deploy
in theinfra
folder to deploy the infrastructure.npx zx scripts/secrets-manager-create-lifecycle-event.mjs
to create a secret. This will create an event that will be picked up by the rule configured in the infrastructurenpx zx scripts/secrets-manager-delete-lifecycle-event.mjs
to delete a secret. This will create an event that will be picked up by the rule configured in the infrastructure