Northbeam Lite: AWS IAM security
Rebuilding a messy AWS account properly, one IAM control at a time, each one broken on purpose to prove it works.
Northbeam, a fictional two-person SaaS startup that started with root logins and AdministratorAccess for everyone.
IAMSTSABACPermissions boundariesOIDCIMDSv2AWS CLI
Read the write-upPermanent credentials that never expire, two people who can each delete production, and dev experiments sharing an account with customer data. Nothing technically prevents disaster, only carefulness, which is not a security control.
Architecture
What I built
- 1Account foundations, then replaced the standing admin credential with MFA-gated role assumption through STS.
- 2Worked through policy evaluation logic until explicit deny behaved predictably.
- 3ABAC: one policy covering many projects, driven by principal and resource tags.
- 4Machine identities: an EC2 instance profile with IMDSv2, then GitHub Actions OIDC federation with no stored key.
- 5Permissions boundaries, tested in three checkpoints: create without a boundary, create with one, then attach AdministratorAccess to the capped role and confirm it stays capped.
- 6Audit toolkit: an access key age scanner, an unused role detector, and a CloudTrail AccessDenied hunter.
What broke and how I fixed it
- A long-term access key never carries the MFA flag, so CLI AssumeRole failed until mfa_serial was set in the profile.
- A permissions boundary holds even when AdministratorAccess is attached on top of it. That is the point of the third checkpoint.
- The scope statement is part of the work. Organizations, SCPs, a centralised logging account and Identity Center were deferred on purpose, because joining an Organization would have expired the account credits immediately and ended the later phases.