🛹

Auroraのオートスケールイベントを補足する

に公開

これは何?

Amazon Auroraのオートスケーリング自体は便利だが、作成されたインスタンスを操作したかったり、オートスケールしたことを通知したかったりするので、諸々後続処理できるようにEventBridgeで補足する

結論

{
  "source": ["aws.rds"],
  "detail": {
    "EventCategories": ["creation"],
    "SourceIdentifier": [{
      "prefix": "application-autoscaling-"
    }]
  }
}

参考

https://dev.classmethod.jp/articles/amazon-aurora-auto-scaling-performance-insights/
https://sadayoshi-tada.hatenablog.com/entry/2021/08/03/091546

実際のイベント内容

$ aws rds describe-events \
    --source-identifier application-autoscaling-[instance-id] \
    --source-type db-instance \
    --start-time 2025-04-14T13:00:00+09:00 | jq '.'
{
  "Events": [
    ...
    {
      "SourceIdentifier": "application-autoscaling-[instance-id]",
      "SourceType": "db-instance",
      "Message": "DB instance created",
      "EventCategories": [
        "creation"
      ],
      "Date": "2025-04-14T04:04:09.806000+00:00",
      "SourceArn": "arn:aws:rds:***:***:db:application-autoscaling-[instance-id]"
    },
    ...
  ]
}

Discussion