Back to Blog
How-To 8 min read

How to Automate SOC 2 Evidence Collection with AWS

Automate 60–70% of your SOC 2 evidence collection using AWS-native services: Security Hub, Config, CloudTrail, and Lambda-based evidence pipelines.

Key Takeaways
  • AWS Security Hub CIS Benchmark findings can be auto-exported weekly as compliance score evidence.
  • CloudTrail log exports on a schedule provide continuous monitoring evidence throughout the observation period.
  • Lambda + EventBridge can automate evidence collection and upload to your compliance tool via API.
  • Automated evidence is higher quality than manual screenshots — it includes metadata, timestamps, and is harder to dispute.
  • Automation covers infrastructure evidence; process evidence (access reviews, vendor reviews) still requires human work.

Overview

SOC 2 evidence collection consumes significant engineering time without automation — manual screenshot-taking, log exports, and configuration documentation can take 40–80 hours per year. AWS provides native services that, when configured to export evidence on a schedule, dramatically reduce this burden.

The automation target: set up once, run continuously throughout the observation period, and generate timestamped evidence automatically. When your auditor sends the PBC list, you have months of organised evidence ready to share.

Security Hub Evidence Automation

AWS Security Hub provides continuous compliance scoring against CIS AWS Foundations Benchmark v2.0, AWS Foundational Security Best Practices, and other standards. Set up weekly automated exports of your Security Hub summary score and critical findings.

Implementation: create an EventBridge rule that triggers every Sunday at 00:00 UTC. The rule invokes a Lambda function that calls the Security Hub GetComplianceSummaryByConfigRule API, formats the output as a JSON or CSV report, and stores it in an S3 evidence bucket with the date as the key prefix.

The result: 52 weekly compliance score snapshots per year showing consistent CIS Benchmark compliance. This is strong evidence for CC7.1 (configuration management) and can be shared with auditors as a folder of dated exports.

CloudTrail Automation

CloudTrail already generates logs continuously — automation here means making the evidence accessible and organised. Set up a monthly Lambda that: verifies CloudTrail is enabled in all regions, exports the CloudTrail configuration details (trail ARN, S3 bucket, validation status, encryption), and stores the configuration snapshot as a dated JSON file.

Also configure CloudTrail Insights to detect unusual API call volumes — these insights serve as additional monitoring evidence for CC7.2. Enable CloudTrail Insights from the trail settings and route alerts to CloudWatch for review.

AWS Config Automation

AWS Config continuously records resource configurations. Automate monthly Config compliance reports using the GetComplianceSummaryByConfigRule API to export a summary of all Config Rules with compliance status.

Set up Config notifications via SNS to SQS to Lambda for Config rule failures. When a rule fails (e.g. a security group is opened to 0.0.0.0/0), Lambda creates a Jira ticket with details, triggering your change management and vulnerability management workflows.

Building an Evidence Pipeline

An evidence pipeline is an EventBridge-triggered Lambda that collects multiple evidence types on a schedule and stores them in an organised S3 evidence bucket. Sample pipeline structure: EventBridge cron (weekly) to Lambda function to collect Security Hub score, IAM credential report, GuardDuty summary, and Config compliance status, then format and store in S3 at your-soc2-evidence/[year]/[week]/.

The IAM credential report is particularly valuable: it exports a CSV of all IAM users with MFA status, last activity, access key age, and password age. Generating this weekly creates a record of your MFA compliance status throughout the observation period.

Connect this to AuditPath via the API to automatically mark the MFA control as evidenced each week.

What Cannot Be Automated

Process evidence requires human activities: access reviews (you still need a human to verify each user is appropriate), vendor reviews (the decision about vendor risk requires human judgement), incident post-mortems (the analysis and lessons-learned are inherently human), and change management approvals (pull request reviews are human judgements).

Policy-related evidence cannot be automated: policy documents require human writing, approval, and acknowledgement.

The right model: automate all infrastructure and configuration evidence (targeting 60–70% of your total evidence requirements), and build systematic human processes for the remainder.

Frequently Asked Questions

Can I use Terraform to automate SOC 2 evidence collection?
Terraform can automate the configuration of the evidence collection infrastructure (EventBridge rules, Lambda functions, S3 buckets with proper retention policies). The Terraform state itself also serves as evidence of infrastructure configuration.
How do I store automated evidence securely?
Store evidence in a dedicated S3 bucket with: SSE-KMS encryption, S3 versioning enabled, S3 Object Lock (WORM mode) to prevent tampering, and restricted bucket policy. This creates a tamper-evident evidence archive.
Does automated evidence replace manual evidence for auditors?
Auditors accept automated evidence — in fact, they often prefer it because it is more objective and harder to manipulate than manual screenshots. The key requirement is that automated evidence is clearly dated and explained with context.
How do I connect AWS evidence to AuditPath?
AuditPath has native AWS integrations that pull IAM credential reports, Security Hub findings, GuardDuty alerts, and CloudTrail configuration automatically. Connect your AWS account in the AuditPath integrations settings (requires IAM role with read-only permissions).
What is the cost of running an automated evidence pipeline?
Very low. A weekly Lambda function running for 30 seconds costs approximately $0.02/month. S3 storage for evidence files: approximately $0.02–$0.05/month. EventBridge rule invocations: effectively free. Total cost: under $1/month for most setups.

Automate your compliance today

AuditPath runs 86+ automated checks across AWS, GitHub, Okta, and 14 more integrations. SOC 2 and DPDP Act. Free plan available.

Start for free