| title | EksRuntimeDetectionFoundation |
|---|---|
| description | GuardDuty EKS Audit Logs + Runtime Monitoring features, plus CloudWatch metric filters / alarms for secret-read and pods/exec audit events. Routed to a consumer SNS topic. |
@hulumi/k8s-baseline.EksRuntimeDetectionFoundation — wires up the EKS detection lane (M5):
aws.guardduty.DetectorFeatureforEKS_AUDIT_LOGSandEKS_RUNTIME_MONITORING.aws.cloudwatch.LogMetricFilter+aws.cloudwatch.MetricAlarmfor secret reads (get/list/watchonsecrets).- Same for
pods/execaudit events.
Consumer supplies the GuardDuty detector ID, the CloudWatch Logs group receiving audit logs, and an SNS topic ARN for alarm actions (typically MonitoringFoundation.alarmTopicArn).
new EksRuntimeDetectionFoundation("prod-eks-detection", {
clusterName: "prod-eks",
guardDutyDetectorId: detector.id,
auditLogGroupName: "/aws/eks/prod-eks/audit",
alarmSnsTopicArn: monitoring.alarmTopicArn,
});GuardDuty Runtime Monitoring is unsupported on EKS-on-Fargate. When clusterCompute: "fargate-only" the component:
- skips the
EKS_RUNTIME_MONITORINGfeature, - emits
pulumi.log.warnifenableRuntimeMonitoring: truewas explicitly set, - exposes
runtimeMonitoringUnsupported: Output<true>.
Audit-log detection (which keys off control-plane logs, not pod runtime) still works on Fargate.
MAX_RUNTIME_ALARM_RULES = 32— emitted alarm count is capped.
Source: packages/k8s-baseline/src/eks-runtime-detection-foundation.ts.