Home > Enterprise >  AWS Alert on RDS Cluster creation
AWS Alert on RDS Cluster creation

Time:04-07

I wanted to know if there is a way to get alerted when a new RDS cluster is created in an AWS account. We do not have correct permissions setup as in AWS and so we are not sure who all are creating RDS Clusters without our knowledge. Taking care of permissions will take some time however in the meanwhile I wanted to check if there is a way to get alerted (via any AWS service or any Lambda function running periodically or anything else) when a new RDS Cluster is created?

Thanks

CodePudding user response:

AWS have an article here covering a pretty similar scenario; creating a notification in SNS when a specific resource is created. The only real prerequisite is that you need an existing SNS topic to send the alerts to, but the article does link to a guide to create one of those as well.

They specify an EC2 as the resource to alert on in the Event Pattern (step 7), so you'd want to modify the 'ResourceType' field to be "AWS::RDS::DBCluster" and/or "AWS::RDS::DBInstance" instead.

{
  "source": [
    "aws.config"
  ],
  "detail-type": [
    "Config Configuration Item Change"
  ],
  "detail": {
    "messageType": [
      "ConfigurationItemChangeNotification"
    ],
    "configurationItem": {
      "resourceType": [
        "AWS::RDS::DBCluster",
        "AWS::RDS::DBInstance"
      ],
      "configurationItemStatus": [
        "ResourceDiscovered"
      ]
    }
  }
}
  • Related