Back to Intelligence

Elastic Workflows Adds AWS Containment: IAM Key Deactivation, EC2 Quarantine, and S3 Lockdown From One Analyst Approval

SA
Security Arsenal Team
December 6, 2026
7 min read

Elastic has shipped a set of AWS containment workflows that execute remediation actions directly from the alert context — with no intermediary Lambda functions, no custom glue code, and a single analyst approval gate. The workflows handle the four containment actions that matter most during an active AWS compromise: deactivating IAM access keys, quarantining EC2 network interfaces, restarting a tampered-with CloudTrail trail, and blocking public access on S3 buckets. Critically, each workflow signs its own AWS API calls and then re-queries AWS to confirm the change actually took effect.

This matters because the gap between detection and containment is where cloud intrusions are won or lost. In our IR engagements involving AWS key compromise, the attacker's dwell time advantage is measured in API calls — iam:CreateAccessKey, ec2:RunInstances, s3:PutObject — and every manual step in the defender's loop (copy the key ID, open the console, switch to the right account, find the right IAM user) extends that window. Elastic Workflows compresses that loop to one human decision: approve.

Technical Analysis

What the capability actually does

Traditional cloud SOAR patterns for AWS typically route through Lambda: the SIEM or detection engine fires, an event bus invokes a Lambda, the Lambda assumes a role and makes the containment API call, and a separate polling mechanism confirms success. Every hop in that chain is a point of failure, a source of latency, and an additional IAM permission surface to govern.

Elastic Workflows removes the middleman. The workflow engine itself signs AWS API requests — meaning it speaks SigV4 directly to AWS service endpoints — and executes the remediation steps as native workflow actions. The architecture has two properties defenders should care about:

  1. Signed, auditable API calls. Because the workflow signs its own requests, every containment action appears in CloudTrail as a first-class AWS API event attributable to the workflow's IAM identity. There is no opaque automation layer obscuring who did what — a property that pays off during post-incident forensics and compliance review.

  2. Closed-loop verification. Each workflow follows the act-then-verify pattern: issue the containment call, then query AWS to confirm the resource state actually changed. A workflow that deactivates an access key follows up by checking the key status; a workflow that quarantines an EC2 instance confirms the interface state. This eliminates the silent-failure class of SOAR bugs where the action errors out, the playbook marks itself complete, and nobody notices the attacker still has valid credentials.

The four containment workflows

  • IAM access key deactivation — targets compromised or leaked long-lived credentials (UpdateAccessKey to set status to Inactive, followed by state verification). This is the highest-frequency action in AWS credential-compromise IR and the one where speed matters most, since a live key is valid until deactivated regardless of when the alert fired.
  • EC2 network quarantine — isolates a compromised instance at the network interface layer, severing attacker C2 and lateral movement without terminating the instance and destroying forensic evidence in memory. Preserving the running instance for later capture is the correct IR posture; pulling the plug is not.
  • CloudTrail restart — responds to the classic anti-forensics move of stopping or deleting trails (StopLogging, DeleteTrail). Attackers blind your logging pipeline before or during the intrusion; the workflow restores the trail and confirms logging resumed, shrinking the evidence gap.
  • S3 public access block — remediates exposure findings by applying public access block configuration and verifying the bucket is no longer reachable publicly, closing the exfiltration/exposure path that drives a disproportionate share of AWS breach disclosures.

The analyst-approval design

Full automation of destructive containment actions is a false economy in most environments — deactivating the wrong IAM key breaks production workloads, and quarantining the wrong instance takes down services. Elastic's design keeps a human in the loop at exactly one point: the analyst reviews the alert context and approves the containment, after which every subsequent step (the API call, the verification query, the audit trail) runs unattended. This is the right trust boundary for most SOCs: humans decide, machines execute and verify.

Exploitation status

This is a defensive capability announcement, not a vulnerability disclosure — there is no associated CVE, exploit, or active campaign. The relevance is operational: the threat techniques these workflows counter (IAM key abuse, EC2 compromise, CloudTrail tampering, S3 exposure) are among the most consistently observed AWS attack patterns in current incident response casework.

Detection & Response

Executive Takeaways

This is a platform capability story rather than a discrete threat, so the value here is organizational — how to close your own detection-to-containment gap in AWS, whether or not you adopt Elastic Workflows.

  1. Measure your containment latency, then attack it. Instrument the time from alert creation to IAM key deactivation in your environment. If it exceeds five minutes, you have a process problem that tooling alone won't fix. The analyst-approval model is only as fast as your alert queue — triage SLAs and 24/7 coverage determine whether one-click containment actually means one minute or six hours.

  2. Eliminate long-lived IAM access keys wherever possible. The single most effective way to reduce the value of the key-deactivation workflow is to have fewer keys to deactivate. Migrate workloads to IAM roles and instance profiles, enforce federation for human access, and alert on any CreateAccessKey call outside an approved provisioning pipeline. Every remaining key should have a documented owner and a maximum age.

  3. Treat CloudTrail tampering as a sev-1 event. Alert on StopLogging, DeleteTrail, UpdateTrail, and PutEventSelectors across every account and region, and pipe those events somewhere the attacker can't reach — a dedicated log-archive account with an SCP denying trail modification. Attackers who stop logging are signaling intent; the response should be immediate containment, not a ticket.

  4. Quarantine, don't terminate, EC2 instances. Build your IR runbooks around network isolation via security group swap or interface manipulation rather than instance termination. Memory-resident evidence — attacker tooling, credentials in use, active sessions — dies with the instance. Snapshot EBS volumes and capture memory where feasible before any destructive action.

  5. Enforce S3 Block Public Access at the account level, not the bucket level. Account-level public access block via SCP or organization policy removes the misconfiguration class entirely, so the remediation workflow becomes a backstop rather than a front-line control. Verify continuously with AWS Config rules, not point-in-time scans.

  6. Demand closed-loop verification from every automation you build. Whatever SOAR or workflow platform you run, apply the act-then-verify pattern: every containment action must be followed by an API query confirming the resource state changed, with failures paged as incidents themselves. A containment action that silently failed is worse than no automation — it creates false confidence during an active intrusion.

Remediation

There is no patch to apply — this is a capability to adopt and an architecture pattern to replicate. For organizations hardening their own AWS response posture, the following verification steps map directly to the four containment domains. The commands below audit the exact resource states these workflows manipulate:

Bash / Shell
# 1. IAM: enumerate all active access keys older than 90 days across users
for user in $(aws iam list-users --query 'Users[].UserName' --output text); do
  aws iam list-access-keys --user-name "$user" \
    --query 'AccessKeyMetadata[?Status==`Active`].[UserName,AccessKeyId,CreateDate]' \
    --output table
done

# 2. CloudTrail: verify every trail in every region is actively logging
aws cloudtrail describe-trails --query 'trailList[?IsMultiRegionTrail==`true`].[Name,TrailARN]'
aws cloudtrail get-trail-status --name <trail-name> \
  --query '{IsLogging:IsLogging,LatestDeliveryTime:LatestDeliveryTime}'

# 3. S3: confirm account-level public access block is enforced
aws s3control get-public-access-block --account-id <account-id>

# 4. EC2: identify the isolation security group used for quarantine (should exist in every VPC)
aws ec2 describe-security-groups --filters Name=group-name,Values=ir-quarantine-isolated \
  --query 'SecurityGroups[].[GroupId,VpcId]' --output table

For organizations evaluating Elastic Workflows: validate that the workflow identity operates under least-privilege IAM — it needs only the specific containment actions (iam:UpdateAccessKey, ec2:ModifyNetworkInterfaceAttribute and related, cloudtrail:StartLogging, s3:PutPublicAccessBlock) scoped to the accounts in scope, with Deny boundaries via SCP preventing the automation role itself from being abused for privilege escalation. Test each workflow against a canary resource monthly; automation that has never fired in anger fails when it matters.

Related Resources

Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.