How IAM Roles Anywhere Works
- Trust Anchor: your CA certificate, registered with IAM Roles Anywhere in the account
- Profile: configuration for which roles can be assumed, what session policies apply, how long sessions last
- Role: the IAM role itself, with a trust policy allowing rolesanywhere.amazonaws.com to assume it
The Certificate Setup
Deploying to All 8 Accounts via LZA
The PEM String Corruption Problem
- Storing in Parameter Store and using a Custom:: Lambda resource to fetch it at deploy time adds complexity
- Using {{resolve:ssm:...}} only works for simple string values, and LZA processes the resolution before CloudFormation does, which is where the corruption happens
Configuring the AWS CLI
What This Replaced
What This Doesn't Solve
Tech Stack
- IAM Roles Anywhere for certificate-based workload authentication
- aws_signing_helper (v1.8.x, Homebrew: rolesanywhere-credential-helper) for credential exchange
- Custom CA (OpenSSL, self-signed, CN=Homelab-CA, 10-year validity)
- Machine certificate (CN=homelab-host, digitalSignature + clientAuth, signed by Homelab-CA)
- AWS Landing Zone Accelerator for multi-account CloudFormation deployment
- AWS Identity Center (SSO) for human console access