Menu

AWS Canary Credentials: How to Set Up an IAM Honeytoken
📰

AWS Canary Credentials: How to Set Up an IAM Honeytoken

DEV Community: aws·Ilia Dubovskii·3 days ago
#wwqr1tlr
#devtoaws#devto#dev#canary#region
Reading 0:00
15s threshold

A canary credential, or AWS honeytoken, is a real AWS access key that can do nothing and that nobody legitimate will ever use. You plant it where an attacker looks for credentials. When someone uses it, CloudTrail records the call and you get an alert that carries very little doubt, and that points at exactly one place: wherever you planted that key. This guide builds one from scratch in Terraform, explains the AWS details that most write-ups get wrong, and compares the free and commercial alternatives honestly.

The short version

Create an IAM user with no console access, an explicit deny-all policy and one access key.

Alert on any CloudTrail event from that user. If you use EventBridge, the rule needs state = "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS" (AWS provider 5.27.0 or later).…

Continue reading — create a free account

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