How aws-samples/amazon-guardduty-automated-response-sample works
Project type and purpose
• This is a serverless, event-driven security automation solution for AWS (an AWS “full-stack” cloud application without a traditional UI).
• It listens for Amazon GuardDuty findings (EC2, S3, IAM) and automatically quarantines or remediates affected resources via AWS Step Functions and Lambda.
File structure
• Top-level:
• template.yml (SAM/CloudFormation)
• src/quarantine/ (Lambda handler + plugin framework + resource abstractions)
• events/ (sample GuardDuty event JSON)
• doc/architecture.drawio & .png (reference architecture)
• The Lambda code uses a plugin-based design (plugins/01_…11) to sequence discrete quarantine steps.
• Resource wrappers (resources/) encapsulate AWS API calls (EC2, S3, SNS, SSM, ASG, ELB, IAM).
README for additional insights
• GuardDuty → EventBridge → Step Functions → Lambda → plugin sequence
• On EC2 findings: snapshot volumes, tag instance, detach from ASG, isolate network, etc.
• On S3 findings: block public access via PutPublicAccessBlock
• On IAM findings: attach revoke-session policy
Final advice
• Essential elements: event sources, orchestration, compute, data stores, and resource remediation.
• Reference doc/architecture.drawio as a starting template, then tailor it to highlight the plugin-based quarantining and resource abstractions.