Skip to content
SecurityDIFFICULTY: AdvancedSTATUS: Prototype

Automated Incident Response (SOAR) Pipeline

EventBridge, Step Functions & Lambda Security Orchestration

GitHub Repository
Client / ScopePersonal Lab Build
My RoleSole Developer
Duration—
Completion Date—

1. SYSTEM OVERVIEW

Executive Summary

A security orchestration pipeline that detects unauthorized EC2 security group modifications via EventBridge, orchestrates response with Step Functions, isolates instances with Lambda, captures EBS forensic evidence, and publishes reports to SNS.

Business Problem

Manually responding to suspicious security group changes is slow and inconsistent, leaving compromised instances reachable while analysts investigate.

Business Impact Value

Turns detection into an automated, repeatable runbook: isolate first, preserve evidence, then notify — shrinking the window between signal and containment.

Key Engineering Goals
  • Detect unauthorized EC2 security group modifications in near real time
  • Orchestrate isolation, forensics, and notification as one auditable workflow
  • Validate the pipeline by simulating security events end to end
My System Responsibilities
  • Designed the EventBridge detection rule and Step Functions orchestration
  • Implemented Lambda isolation and EBS snapshot forensics steps
  • Validated the pipeline with simulated security events and execution history review

2. SYSTEM FEATURES

Drift Detection RuleComplexity: Medium

Catches unauthorized EC2 security group modifications as they happen.

Impl:EventBridge rule matching security group API activity.
Orchestrated ResponseComplexity: High

Runs isolation, forensics, and reporting as one ordered workflow.

Impl:Step Functions state machine coordinating Lambda tasks.
Isolate and PreserveComplexity: Medium

Cuts off compromised instances while snapshotting disks for forensics.

Impl:Lambda reversions plus EBS snapshot creation before notification.

3. SYSTEM ARCHITECTURE

Event-driven response chain: a detection event fans out into isolation, evidence capture, and notification, all tracked as a single state machine execution.

Topology Vector Diagram
EC2 SG Change ──> EventBridge Rule ──> Step Functions
                                              │
                    ┌─────────────────────────┼─────────────────────────┐
                    ▼                         ▼                         ▼
             Lambda (Isolate)        EBS Snapshot              SNS Incident Report
Pipeline flow sequences
Unauthorized security group modification triggers the EventBridge rule
Step Functions execution starts with the event payload
Lambda reverts the change and isolates the instance
EBS snapshots capture forensic evidence
SNS publishes the incident report for review
Repo directory structure
soar-pipeline/
├── template.yaml              # EventBridge rule + functions
├── src/
│   ├── isolate.py             # Instance isolation
│   ├── snapshot.py            # Forensic capture
│   └── notify.py              # Report formatting
└── tests/
    └── simulate_event.json    # Simulated security event

4. INTERACTIVE SIMULATOR WIDGET

Run active operations audits utilizing the custom sandbox telemetry receiver widget below.

No interactive widget available for this system configuration.

5. ENGINEERING ARCHITECTURE DECISIONS (ADRs)

Decision ProfileChoose orchestration model for multi-step incident response
Context

Isolation, forensics, and notification must run in order with retries and a full audit trail.

Alternatives Checked
  • Chained Lambda invocations
  • Step Functions state machine
  • Manual runbook execution
Selected Decision

Step Functions state machine

Advantages
  • Built-in retries, ordering, and execution history
  • Each incident is replayable and auditable
  • Easy to add or reorder response steps later
Disadvantages
  • State transitions add cost per execution
  • More setup than direct function chaining
Trade-off details

Accepted per-execution orchestration overhead in exchange for reliability and a complete audit trail.

Future Scaling direction

Add approval gates before destructive isolation actions in production accounts.

6. DETAILED TECHNOLOGY STACK

cloud
• AWS EventBridge• AWS Step Functions• AWS Lambda• Amazon SNS• Amazon EBS
security
• EC2 Security Groups• Forensic Snapshots
monitoring
• Step Functions Execution History• CloudWatch Metrics

7. SECURITY REVIEW & POSTURE

Least-Privilege Response Roles

Response functions need powerful actions (isolation, snapshots) that must not become a privilege escalation path.

Mitigation StrategyScoped IAM roles limited to the specific EC2, EBS, and SNS actions each function requires.
Forensic Evidence Integrity

Snapshots taken after an incident must be trustworthy for later analysis.

Mitigation StrategySnapshots are created before any remediation writes, tagged with the incident execution ID.

9. ENGINEERING CHALLENGES & RESOLUTIONS

Vulnerability Bottleneck

Validating the pipeline without a real attack to respond to.

Root Cause:Detection and response logic only runs when matching security events occur.

System Investigation

Crafted simulated security group modification events and traced them through execution history.

Engineering Solution

Built a repeatable simulation event plus checks on execution history, metrics, and isolation effectiveness.

Trade-offs accepted

Simulations approximate but never fully reproduce attacker behavior.

Lessons Derived

Security automation needs a test harness from day one, not just production events.

10. SYSTEM LESSONS LEARNED

Engineering Lessons

Orchestration beats chaining: explicit state machines make incident flows reviewable.

Architecture Lessons

Decouple detection from response so either side can evolve independently.

Business Lessons

Automated evidence capture turns incidents from anecdotes into auditable records.

System Redesign Plans

I would add a human approval step before isolation for production use.

11. ROADMAP & TECHNICAL DEBT

  • Add approval gates for destructive actions
  • Extend detection beyond security groups to IAM and network ACL changes
  • Score and prioritize findings before paging responders

12. GITHUB SOURCE EXPLORER

Audit raw repository script configurations directly inside the active terminal workspace.

HarizuAru/Portfoliomain
Open on GitHub
Workspace Files
1
Encoding: UTF-8Lines: 1
Let's discuss your project

Interested in building a secure auto-scaling platform similar to this?

Keep exploring

Related Projects

All projects →
Security · Cloud · DevOpsProduction

CloudTrail Threat Detection Platform

An event-driven cloud security analytics pipeline that ingests AWS CloudTrail records, applies normalization and risk scoring heuristics, and fires alert integrations under 45 seconds to secure distributed multi-tenant AWS accounts.

ArchitectureCloudTrail → S3 → Lambda → EventBridge → SNS

  • aws
  • security
  • lambda
  • eventbridge
  • siem
Cloud · DevOpsPrototype

Distributed Queue Worker Operations

A production-style distributed queue processing system: a Lambda worker drains DynamoDB orders from SQS with structured correlation logging, multi-dimensional CloudWatch monitoring, SNS alert routing, injected failure drills, and runbook-driven recovery measured against SLOs.

ArchitectureSQS → Lambda Worker → DynamoDB → CloudWatch → SNS Alert Queue

  • aws
  • sqs
  • lambda
  • dynamodb
  • cloudwatch
Cloud · DevOpsPrototype

Distributed Sagas: Fault-Tolerant Order Processing

A saga-based order processing system on Step Functions implementing idempotent operations, bounded retries, compensating actions, manual repair procedures, failure testing, and a transactional outbox over DynamoDB Streams to close the write/publish gap.

ArchitectureAPI → Step Functions Saga → Services → Compensations → DynamoDB Streams Outbox

  • aws
  • step-functions
  • saga
  • dynamodb
  • outbox