title: Configure CloudWatch Secret Manger event to trigger another lambda function
body: <p>I have set up AWS Secret Manager which contains my Redshift credentials. I have enabled secret rotation on my secret. I have used the sample Code given by AWS to set up a lambda function that gets the credentials and have subscribed SNS topic to the lambda which works fine.</p>
  <p>I would like AWS Cloudwatch Events to set up a rule that whenever the rotation of secret has Succeeded it triggers my lambda function.</p>
  <p>Upon reading the AWS documentation for monitoring my secrets:  <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudwatch" rel="nofollow noreferrer">https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudwatch</a></p>
  <p>I have configured the Cloudtrail logs file to deliver to Cloduwatch Logs.</p>
  <p>I have then set up a Cloudwatch Event rule which has <strong>Secret Manager</strong> as the Service, EventType: <strong>AWS API call events</strong> and specific operations: ** RotationSucceeded** - a mechanism that notifies you of a successful rotation event.</p>
  <p><a href="https://i.stack.imgur.com/yd25f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yd25f.png" alt="Cloudwatchevent" /></a></p>
  <p>However, when the secret rotation successfully occurs, the cloud watch event does not trigger the lambda function I have set as the target.</p>
  <p>What changes should I make so that the lambda function is triggered every time the Secret is successfully rotated in aws secret manager?</p>