Menu

1 / 9

Build a cloud security scanner without touching a real AWS account

DEV Community: terraform·Vedas Kudalkar·16 days ago
#Q7c34FZo
#devtoterraform#devto#dev#scanner#bucket
Long article (2026 words) — no AI summary yet.
Reading 0:00
15s threshold

A deliberately broken S3 bucket and IAM role, a scanner that fixes them, a drift alarm, and a Terraform rebuild that scans clean. Floci in Docker. No AWS account.

To practice cloud security without an AWS account, I built a boto3 scanner and pointed it at Floci, a local AWS emulator on port 4566. It finds 5 misconfigurations in a bucket and a role I broke on purpose, fixes them, and exits clean. When I break the bucket again, an alarm fires and a message lands in an SQS inbox. Then I rebuild the same environment in Terraform and the scanner finds nothing.

Most of it worked as written. A few parts needed workarounds: Floci has no GetBucketPolicyStatus , S3 encryption is always on so "is it encrypted" is the wrong question, and the alarm lags its own alert by about a minute. This post covers the scanner, the alerting chain, and those three.

Repo: axololtos/local-cloud-security-lab

Why emulate it

Posture tools like Prowler, AWS Config and Security Hub are built for real accounts.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.