AwsCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

AWS VPC Flow Logs Rejected Traffic Anomaly Sentinel

Queries CloudWatch Logs Insights on VPC Flow Logs to detect security group rejections and unauthorized network scans.

Categories
CloudInfrastructure

How it works

This workflow executes a CloudWatch Logs Insights query against AWS VPC Flow Logs, filtering for action = 'REJECT' and aggregating packet counts by source IP and destination port. When external attackers scan public subnets or compromised instances attempt lateral movement across private VPCs, NACLs and Security Groups reject the packets. When rejected traffic exceeds the threshold, an incident alert is sent to Slack.

What you get

  • Immediate detection of port scanning, lateral traversal, and misconfigured firewall rules.
  • Direct visibility into source IP addresses and destination ports generating rejected traffic.
  • Prevents undetected reconnaissance on internal cloud VPC assets.

Who it's for

  • Cloud Security Architects and SOC Analysts monitoring AWS environments.
  • Network Engineers maintaining AWS VPC Security Groups and Network ACLs.

Why orchestrate this with Kestra

  • Native CloudWatch Insights Query: Powerful log analytics executed server-side in AWS.
  • Automated Security Guardrails: Continuous 15-minute evaluation without SIEM license overhead.
  • Context-Rich Alerts: Dispatches specific source IPs and packet counts directly to Slack.

Prerequisites

  • VPC Flow Logs published to a CloudWatch Logs log group.
  • AWS IAM credentials with logs:StartQuery and logs:GetQueryResults.
  • Secrets AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Set log_group_name and aws_region.
  3. Run the workflow to inspect rejected traffic patterns.

How to extend

  • Automatically block abusive public IP addresses via AWS WAF IP set or NACL update.
  • Correlate with AWS GuardDuty finding IDs.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.