DET-162 · human · confidence Medium

Unplanned AWS Resource Creation

Watch CloudTrail for compute, storage and function creation by people or roles that do not normally provision them.

Unapproved cloud resources can be a place to stash stolen data, run unauthorized workloads, or keep a back door. In AWS, management events in CloudTrail show every create call, who made it, and from where. Turn on a multi-region trail so nothing is missed.

The key question is whether the resource came from your pipeline. Resources created with console or CLI access by an identity that is not a deployment role, or that lack required tags, deserve a review. Send alerts through EventBridge or CloudWatch metric filters.

Data sources
CloudTrail management eventsAWS ConfigEventBridge
Platforms
AWS

Logic

eventName IN (RunInstances, CreateVolume, CreateBucket, CreateFunction20150331, UpdateFunctionCode, CreateCluster) AND userIdentity.arn NOT LIKE '%deploy-role%' AND userAgent NOT LIKE 'Terraform%' | stats count by userIdentity.arn, eventName, awsRegion

False positives

Developers in sandbox accounts create resources by hand all the time. Scope this to production and shared accounts first.

Catches 8 techniques