
Building Real-World Security Platforms on AWS Security Agent and AWS Continuum
WS Security Agent and AWS Continuum represent a fundamental shift in how AWS approaches security — from passive scanning to active, AI-driven testing and continuous autonomous remediation. This post explores what these services are, who they are for, four real-world use cases, and a deep architectural walkthrough of Veriguard: a fully serverless, multi-tenant MSSP platform built on both services and deployable from a single CloudFormation command.
The Problem With "Security As a Snapshot"
Most security tools tell you what was wrong at a point in time. You run a scan at 9 AM. The report is out of date by 9:01 AM, because a developer just pushed a new API endpoint, a CloudFormation stack just created a new security group, and a misconfigured IAM role just got attached to a Lambda function.
Traditional security fits into one of two buckets:
Passive / detective — Inspector, Security Hub, GuardDuty. These watch your infrastructure and alert you when something looks wrong. They are essential, but they wait for you to come to them.
Point-in-time active — Penetration tests, red team exercises. A human security engineer spends days or weeks attacking your application, writes a report, and hands it over. By the time you've remediated the findings, six months have passed and the application has changed significantly.
Neither model scales for modern cloud environments where applications change continuously and security must keep up in real time.
AWS Security Agent and AWS Continuum together close this gap. They represent something genuinely new: autonomous, agentic security that actively tests, continuously monitors, and automatically remediates — all with the auditability and IAM integration you expect from AWS.
Meet the Two New Services
AWS Security Agent
AWS Security Agent (GA March 2026) is an AI-powered service that actively penetration-tests your web applications. It doesn't just scan for known CVEs — it understands your application's behavior, adapts its attack patterns to the specific endpoints and authentication flows it discovers, and produces findings that map to real, exploitable vulnerabilities.
Think of it as a security engineer embedded inside your AWS account, continuously testing your application 24/7, with no burnout and no scope limitations.
It operates through four CloudFormation resource types:
Resource | What it does |
|---|---|
AWS::SecurityAgent::Application | One per AWS account. Activates the service; sets the IAM role used by WebApp users. Think of this as "turning the service on" at the account level. |
AWS::SecurityAgent::AgentSpace | A logical workspace representing one engagement (one customer, one application, one environment). Registers which IAM roles are allowed and which verified domain will be tested. |
AWS::SecurityAgent::TargetDomain | Registers and verifies ownership of the application domain (e.g., app.acme.com) before testing begins. Prevents unauthorized testing of domains you don't own. |
AWS::SecurityAgent::Pentest | The actual test configuration — which AgentSpace, which service role, which target URLs, and how the agent authenticates into the application. |
The IAM model has three dedicated role types:
- Application Role: Grants WebApp users the ability to call Security Agent APIs (list findings, list spaces, create sessions).
- Pentest Service Role: Assumed by the Security Agent service to read your AWS resources during testing (VPC topology, security groups, IAM policies, CloudWatch logs).
- Actor Role: Assumed by the Security Agent to log into your application as a test user and attack it from the inside.
AWS Continuum
AWS Continuum is the remediation layer that sits on top of AWS Security Agent (and other AWS security services). Where Security Agent finds vulnerabilities, Continuum fixes them — automatically, continuously, and with a full audit trail.
Continuum's model is: detect → reason → remediate → validate → repeat.
It understands the difference between "disable this overly-permissive IAM policy" (safe to automate) and "delete this production database" (definitely not safe to automate). The service uses AI reasoning to decide whether remediation is safe to apply automatically, requires human approval, or should be flagged for review.
Key capabilities:
- Drift remediation: When a resource drifts out of compliance (an S3 bucket's encryption gets removed, a security group opens port 22 to the world), Continuum corrects it automatically.
- Code remediation: When Security Agent finds a vulnerability in your application code, Continuum can open a pull request with the fix — directly in your GitHub or CodeCommit repository.
- Control-continuous verification: Continuum continuously validates that your environment meets the controls it has been configured to enforce, not just at audit time.
Note on availability: AWS Continuum does not yet have CloudFormation resource types as of this writing. Infrastructure-as-Code integration for Continuum is on the roadmap. Today, Continuum is configured via the Security Agent console and API. CloudFormation-managed architectures can integrate by invoking the Continuum API from Lambda functions or Step Functions as the bridge.
How They Work Together
┌──────────────────────────┐ │ Your Application │ │ (Web / API / Lambda) │ └──────────┬───────────────┘ │ ┌──────────▼───────────────┐ │ AWS Security Agent │ │ Active Pentest │ │ (Finds vulnerabilities)│ └──────────┬───────────────┘ │ Finding created ┌──────────▼───────────────┐ │ AWS Continuum │ │ Reasoning + Remediation│ │ (Fixes the issue) │ └──────────┬───────────────┘ │ PR / policy fix / config change ┌──────────▼───────────────┐ │ Your Application │ │ (Now more secure) │ └──────────────────────────┘Security Agent finds the problem. Continuum fixes it. The cycle runs continuously. You get a live, self-hardening application instead of a quarterly PDF report.
Four Real-World Use Cases
Now let's look at who actually builds with these services and why.
Use Case 1: Enterprise AppSec — Continuous Red Teaming at Scale
Who: A large enterprise with 50+ internal web applications, a dedicated AppSec team, and a mandate to pass annual penetration testing audits.
The old way: Hire a third-party pen testing firm for $50K per engagement. Get a PDF report in 6 weeks. Spend 3 months remediating. Repeat next year. Total coverage: once per year.
The new way: Deploy an
AWS::SecurityAgent::AgentSpace for each application. Configure a Pentest resource that runs continuously against each app. Connect Continuum so that low-risk findings (outdated headers, verbose error messages, stale TLS cipher suites) get automatically remediated via pull requests. High-severity findings (SQL injection, authentication bypass) trigger an SNS alert to the AppSec team within minutes, not weeks.Architecture pattern:
Developer pushes code │ ▼CodePipeline / GitHub Actions │ ▼ (on every prod deploy)Lambda: Create/Update AWS::SecurityAgent::Pentest │ ▼Security Agent: Active test against new version │ ▼EventBridge: finding.created event │ ├──→ SQS → Jira ticket (Critical/High) ├──→ Continuum: auto-remediate (Medium/Low) └──→ S3: evidence package for complianceKey benefit: Annual pentest becomes continuous. Coverage goes from 1x/year to 8,760 hours/year.
Use Case 2: Developer-Centric Security — Shift Left with AI Fixes
Who: A startup or scale-up engineering team that wants security baked into the development workflow, not bolted on at release time.
The old way: SAST/DAST tools run in CI/CD. They produce 200 findings, most of which are false positives, none of which come with actionable fixes. Developers ignore the scan results.
The new way: AWS Security Agent runs against the staging environment on every pull request. AWS Continuum's code remediation opens a follow-up PR with actual fixes — not "here's what's wrong," but "here's the code change that fixes it, reviewed and ready to merge."
Architecture pattern:
PR opened → GitHub Actions │ ▼Lambda: Trigger Security Agent pentest on staging URL │ ▼Security Agent: Test against PR's staging environment │ ▼ (findings returned)Continuum: Generate fix PR for each finding │ ▼GitHub: Two PRs — one with the feature, one with the security fix │ Developer reviews and merges bothKey benefit: Security becomes part of the merge workflow. Developers see the fix in the same PR flow they already use. No context-switching to a separate security console.
Use Case 3: Compliance Automation — Audit-Ready Continuously
Who: A SaaS company under SOC 2 Type II, HIPAA, or PCI DSS obligation. Auditors ask for "evidence of continuous monitoring" and "evidence of penetration testing." Today this means a manual exercise every quarter.
The old way: Three weeks before the audit window, pull logs manually, export findings to spreadsheets, format evidence packages in Word, submit to auditors. No automated linkage between the test findings and the controls they satisfy.
The new way: Security Agent produces structured findings mapped to test types (authentication bypass, data exposure, injection, etc.). A Step Functions workflow maps those findings to framework controls (SOC 2 CC6.1, HIPAA 164.312, PCI Req 6.3) automatically. AWS Continuum's continuous control verification confirms that remediations are holding. S3 Object Lock stores the evidence packages in immutable form. Auditors get a link to a pre-built evidence API, not a ZIP file.
Architecture pattern:
Security Agent: findings.created │ ▼EventBridge → SQS → Lambda: Control Mapping │ (maps finding types → framework controls) ▼Step Functions: Evidence Package Workflow Step 1: Collect findings for period Step 2: Map to controls Step 3: Correlate with Continuum remediation log Step 4: Write immutable package to S3 (Object Lock, Compliance mode) Step 5: Update EvidencePackagesTable: status = LOCKED │ ▼Auditor-facing API: GET /evidence?framework=SOC2&period=Q1-2026Key benefit: The audit evidence practically generates itself. The "evidence package" is always current, always signed, always immutable. Audit prep goes from 3 weeks to 30 minutes.
Use Case 4: Multi-Tenant MSSP Operations — The Use Case I Built
Who: A Managed Security Service Provider running security operations for 40+ customers. Each customer has their own AWS account, their own web applications, their own compliance framework, and their own SLA.
This is the use case I built end-to-end. The result is Veriguard — a unified MSSP platform with a multi-tenant console (MSSP Console) and a continuous compliance layer (Comply), both running fully serverless on AWS.
Deep Dive: Building Veriguard on AWS Security Agent and AWS Continuum
The Problem I Was Solving
A typical MSSP engineer's day: log into Customer A's AWS account, pull Security Agent findings, copy them into a spreadsheet, log into Customer B's account, do the same, stitch everything into a PowerPoint for the weekly compliance review. Multiply by 40 customers, add SLA tracking and audit evidence generation, and you have a full-time job that adds zero security value.
Veriguard replaces that manual loop with a single-pane-of-glass platform where one console shows all customers, all findings, all SLA health, and all compliance evidence — updated in real time from each customer's Security Agent deployment.
The Two-Stack Architecture
Account: Veriguard Management (your account)┌─────────────────────────────────────────────────────────────┐│ veriguard-platform.yaml (deployed ONCE) ││ ││ API Gateway HTTP API (JWT via Cognito) ││ │ ││ 6 Lambda Functions (Python 3.12) ││ ├── /tenants → DynamoDB: TenantsTable ││ ├── /findings → DynamoDB: FindingsTable ││ ├── /evidence → Step Functions → S3 (WORM) ││ ├── /compliance → DynamoDB: ControlMappingsTable ││ ├── /drift → DynamoDB: DriftEventsTable ││ └── /events → EventBridge → SQS → DLQ │└─────────────────────────────────────────────────────────────┘
Account: Each Customer (per-customer account)┌─────────────────────────────────────────────────────────────┐│ veriguard-customer-onboarding.yaml (deployed per customer) ││ ││ IAM Roles: ││ ApplicationRole, PentestServiceRole, ActorRole ││ ││ AWS Security Agent: ││ TargetDomain → AgentSpace → Pentest ││ ││ (AWS Continuum: configured via API, no CFN support yet) │└─────────────────────────────────────────────────────────────┘Why Two Stacks?
AWS Security Agent resources live in the customer's account. That's where their application runs, where their domain needs to be verified, and where the pentest agent does its work. The MSSP management layer — API, data, auth, evidence — lives in the Veriguard account. This split matches the real ownership boundary in an MSSP engagement and keeps blast radius contained: a misconfiguration in a customer's onboarding stack can't touch the management platform.
The Management Platform: Every Service Choice Explained
API Gateway HTTP API (not REST API). HTTP API is ~70% cheaper, and its built-in JWT authorizer eliminates an extra Lambda authorizer function. Important: the JWT authorizer validates the
aud claim, which only exists on Cognito ID tokens — not Access tokens. Use AuthenticationResult.IdToken when calling the API.Five separate DynamoDB tables (not one). A single "super table" with composite keys is tempting but creates operational noise at 40+ customers. Separate tables mean independent scaling, isolated IAM permissions per Lambda function, and clear operational alarms ("FindingsTable is throttling" beats "TheTable is hot").
Step Functions for evidence packaging. Generating an audit-ready evidence package has six steps: pull findings, pull control mappings, correlate, package, write to S3 with Object Lock, update status. If step 5 fails, you want to retry only step 5 — not re-pull all findings and re-correlate. Step Functions gives per-state retries and a full execution history that doubles as a tamper-evident audit trail.
S3 Object Lock, Compliance mode. No one — not even root, not even AWS Support — can delete or overwrite an evidence package before the retention period expires. This is the storage-layer enforcement that makes SOC 2 evidence packages provably untampered.
EventBridge → SQS. Every security event (new finding, drift detected, pentest completed) emits to a custom EventBridge bus. Downstream consumers (Jira integration, Slack notifier, compliance mapping) subscribe independently. Add a new consumer without touching the producer. SQS with a DLQ means no event is lost even if a downstream Lambda crashes.
AWS Continuum Integration: Where We Are Today
In this architecture, the
drift-remediation Lambda in the platform stack is the intended Continuum integration point. Today it fires on EventBridge drift events and logs them to DriftEventsTable . When Continuum ships its CloudFormation resource types (or a stable API SDK), the Lambda becomes the bridge that submits remediation requests back to Continuum — closing the detect → fix loop entirely in code.For the MSSP use case, Continuum's value is particularly high because the MSSP engineer doesn't have access to the customer's source code repository. Continuum's code remediation can open pull requests in the customer's GitHub repo on behalf of the MSSP, with the MSSP's branding and authorization — without requiring the customer to hand over repo access to a human.
The Customer Onboarding Stack
Deploying a new customer is a single CloudFormation command:
bash
aws cloudformation deploy \ --template-file cloudformation/veriguard-customer-onboarding.yaml \ --stack-name veriguard-onboarding-acme \ --capabilities CAPABILITY_NAMED_IAM \ --parameter-overrides \ CustomerName=acme \ TargetDomainName=app.acme.com \ VeriguardManagementAccountId=<your-account-id> \ VerificationMethod=DNS_TXT \ TargetArchitecture=ApiGatewayThis creates three IAM roles, a
TargetDomain , an AgentSpace , and a Pentest resource. After the stack completes, retrieve the DNS TXT verification token from the Security Agent console, publish it to DNS, and the domain moves to VERIFIED status. The pentest begins automatically.The Three IAM Roles: A Mental Model
Think of the pentest engineer (Security Agent) arriving at a customer site. They need three different badges:
- Application Role — lets them badge into the Veriguard WebApp and call Security Agent APIs to see findings, spaces, and results.
- Pentest Service Role — lets them read the customer's AWS account to understand the attack surface (VPC topology, security groups, IAM, logs).
- Actor Role — lets them log into the customer's actual web application as a test user and attack it from the authenticated side.
The
ActorRole policy is parameterized by the customer's architecture — ApiGateway , LambdaFunctionUrl , or AlbCognito — so you get precisely-scoped permissions, not a wildcard.Five Production Lessons You Won't Find in the Docs
Building on a service that went GA in March 2026 means hitting edges that aren't fully documented yet. Here is exactly what broke, why it broke, and how to fix it.
Lesson 1: AWS::SecurityAgent::Application is an Account-Wide Singleton
Error:
Application already exists for account XXXXXXXXXXXX. Only one application per account is allowed. (Status 402, HandlerErrorCode: AlreadyExists) AWS allows exactly one
Application resource per AWS account. It's auto-provisioned when Security Agent is first activated. If your per-customer onboarding template creates AWS::SecurityAgent::Application , it will succeed for the first customer in an account and fail for every subsequent one.Fix: Remove
Application from per-customer stacks entirely. Neither AgentSpace nor Pentest reference ApplicationId anywhere in their CloudFormation schemas. Application is account-level infrastructure — create it once, manually or as part of a one-time account-bootstrap stack.Design principle: Always determine whether a new resource type is account-scoped, region-scoped, or resource-scoped before designing a repeatable stack around it.
Lesson 2: sts:ExternalId in Trust Policies Breaks ServiceRole Validation
Error:
Failed to validate service role: AWS Security Agent is not authorized to perform: sts:AssumeRole on resource: ...pentest-service-role (Status 400) The official AWS Security Agent IAM documentation shows an example trust policy for
PentestServiceRole that includes a sts:ExternalId condition. Following it literally causes a real deployment failure.Here's why: there is no property anywhere in
AWS::SecurityAgent::AgentSpace , AWS::SecurityAgent::Pentest , or any other Security Agent CFN resource where you can register your chosen ExternalId value with the service. So when the CloudFormation resource handler validates the role during Pentest creation — by calling sts:AssumeRole as securityagent.amazonaws.com — it doesn't know what ExternalId to pass. The condition evaluates false. AssumeRole denied.Fix: Remove the
sts:ExternalId condition from both PentestServiceRole and ActorRole trust policies:json
{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Service": "securityagent.amazonaws.com" }, "Action": "sts:AssumeRole" }]}For confused-deputy protection in production multi-account setups, use
aws:SourceAccount instead — that's the AWS-recommended condition for service-principal trust policies and is compatible with how the service actually calls AssumeRole.Lesson 3: Pentest Title Has a Strict Character Set
Error:
Title can only contain letters, numbers, hyphens, and underscores. Maximum 100 characters. (Status 400) An em dash (
— ) in your !Sub title string silently passes cfn-lint but fails at the API layer. This is not validated locally.Fix: Use only
[A-Za-z0-9\-\_] in Pentest Title values. Change Veriguard pentest — ${CustomerName} to Veriguard-pentest-${CustomerName} .Lesson 4: CloudFormation Circular Dependency in Role → StateMachine → Role
Error:
cfn-lint E3004 — circular dependency: LambdaExecutionRole → EvidencePackageStateMachine → StepFunctionsExecutionRole → EvidenceGeneratorFunction → LambdaExecutionRole If a Lambda's execution role grants
states:StartExecution on a state machine (via !Ref ), and that state machine's definition references the Lambda (via !Ref ), CFN detects a cycle.Fix: Break the cycle by constructing the state machine ARN manually with
!Sub instead of !Ref :yaml
Resource: !Sub arn:aws:states:${AWS::Region}:${AWS::AccountId}:stateMachine:veriguard-evidence-pipeline-${EnvironmentName}This gives CFN the string it needs at template-parse time with no dependency edge.
Lesson 5: DeletionPolicy Without UpdateReplacePolicy
Warning:
cfn-lint W3011 — DeletionPolicy:Retain should be paired with UpdateReplacePolicy:Retain Setting
DeletionPolicy: Retain protects an S3 bucket from accidental stack deletion. But if CFN needs to replace the bucket (you changed an immutable property), it consults UpdateReplacePolicy — which defaults to Delete , silently overriding your intent.Fix: Always pair them:
yaml
DeletionPolicy: RetainUpdateReplacePolicy: Retain
The Complete Deployment Path
The full deployable solution — cfn-lint clean, deployed against a real AWS account — is at:
veriguard-agentic-soc/├── cloudformation/│ ├── veriguard-platform.yaml ← Management platform (deploy once)│ ├── veriguard-customer-onboarding.yaml ← Per-customer Security Agent stack│ ├── seed_data.py ← Loads 6 demo tenants into DynamoDB│ └── README.md ← Full deployment runbook├── demo/│ └── Veriguard_Demo.html ← Single-file clickable demo (no server needed)├── docs/│ └── Veriguard_Architecture_PRD.docx ← 13-page architecture + PRD└── pitch-deck/ └── Veriguard_Pitch_Deck.pptx ← 13-slide investor/customer deckDeploy the management platform:
bash
aws cloudformation deploy \ --template-file cloudformation/veriguard-platform.yaml \ --stack-name veriguard-platform \ --capabilities CAPABILITY_NAMED_IAM \ --parameter-overrides EnvironmentName=prod EvidenceRetentionYears=1Seed demo data:
bash
pip install boto3python3 cloudformation/seed_data.py --stack-name veriguard-platform --region us-east-1Onboard a customer:
bash
aws cloudformation deploy \ --template-file cloudformation/veriguard-customer-onboarding.yaml \ --stack-name veriguard-onboarding-acme \ --capabilities CAPABILITY_NAMED_IAM \ --parameter-overrides \ CustomerName=acme \ TargetDomainName=app.acme.com \ VeriguardManagementAccountId=$(aws sts get-caller-identity --query Account --output text) \ VerificationMethod=DNS_TXT \ TargetArchitecture=ApiGateway
Cost: True Serverless
Every resource in the platform stack is pay-per-request. At zero traffic, your cost is essentially zero:
Service | Model | Zero-traffic cost |
|---|---|---|
API Gateway HTTP API | Per request | $0 |
Lambda (6 functions) | Per invocation | $0 |
DynamoDB (5 tables, on-demand) | Per RW unit | $0 |
Step Functions | Per state transition | $0 |
SQS + EventBridge | Per message | ~$0 |
S3 + Object Lock | Per GB stored | Per GB stored |
Cognito | Per MAU | First 50K MAUs free |
No Aurora minimum, no NAT gateway, no idle EC2, no container that keeps a process running. The MSSP platform costs money only when customers are active.
What's Next
AWS Continuum CloudFormation support. When Continuum ships its CFN resource types, the
drift-remediation Lambda in the platform stack becomes the wiring point. The full detect → reason → remediate → verify loop will be expressible in code with no console steps.IAM Identity Center for the Application Role. The
IdCConfiguration property in AWS::SecurityAgent::Application lets you wire up SSO for WebApp users via IAM Identity Center. This is the path to enterprise SSO without managing Cognito user pools manually.Cross-account hub-spoke for the management console. In the current architecture, Security Agent findings live in the customer's account. A production MSSP platform would have the management account's Lambda assume a read role in each customer account to pull findings centrally, rather than relying on customers to forward events.
Private VPC pentesting. For customers with internal applications not exposed to the internet,
AWS::SecurityAgent::Pentest supports VpcConfig to deploy the agent inside the customer's VPC. This extends Security Agent's reach to private APIs and internal portals.Summary
AWS Security Agent and AWS Continuum together represent the shift from reactive, point-in-time security to continuous, autonomous security. Security Agent actively attacks and finds; Continuum reasons and fixes; the loop runs forever.
The four use cases we covered — enterprise continuous red teaming, developer-shift-left with AI fixes, compliance automation, and multi-tenant MSSP operations — represent real patterns you can deploy today. The Veriguard MSSP platform demonstrates that a production-grade, multi-tenant security operations layer can be built entirely serverless, entirely as code, and deployed in under 10 minutes.
The five production lessons above are the architecture class that the documentation doesn't yet teach. Save yourself a few hours: strip
sts:ExternalId from your service role trust policies, keep Application out of per-customer stacks, and watch your Pentest Title character set.The complete, deployable solution is at https://github.com/elngovind/veriguard-agentic-soc . Clone it, deploy it, and let me know what you build on top.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article