Our Journey Migrating to AWS IMDSv2
Slack enforced IMDSv2 across roughly 60,000 EC2 instances in hundreds of AWS accounts. IMDSv2's session tokens, obtained by PUT and sent as a header, blunt SSRF-based credential theft. The team found IMDSv1 callers with the MetadataNoToken CloudWatch metric, a Prometheus dashboard and ImdsPacketAnalyzer, then made shared Terraform modules require tokens via an exclusion-list module and denied IMDSv1 launches with SCPs. Because SCPs don't cover the root account or service-linked roles such as AutoScaling, they added EventBridge/CloudTrail alerts routed to Slack and an EKS-hosted "IMDSv1 Terminator" that continuously forces IMDSv2 on any instance still allowing v1.
Related posts
- Inside Figma: getting out of the (secure) shell
Figma mediumAdept
Figma replaced its SSH bastion hosts with a zero-trust shell access system built on AWS SSO (backed by Okta with WebAuthn and device trust) and AWS Systems Manager Session Manager, so instances need no exposed SSH ports and access uses short-lived, minimally privileged IAM role credentials. Practical guidance covers scoping IAM policies for EC2 and ECS targets, restricting SSM documents, using RunCommand instead of SSH in deploy scripts, shipping session logs to a locked-down S3 account, and locking down SSM even when unused, since the preinstalled agent and broad default policies are an attack surface. Rollout went from SSH tunneled over SSM, through a grace period and a block on inbound bastion traffic with break-glass access, to a CLI script wrapping aws-vault and the AWS CLI that replaced SSH entirely and gave full session transcripts.
- Security Disclosure Recommendation: Check for Anomalous AWS Access
Railway mediumAdeptIf an AWS access key used with Railway may have been exposed, deactivate it, replace it, redeploy, and audit what it did. Create a second key on the IAM user and deactivate the old one rather than deleting it, so it can be briefly reactivated if a forgotten service breaks. Update the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables on Railway (or the shared variable once) and confirm the new deployment shows no InvalidClientTokenId or SignatureDoesNotMatch errors. Then search CloudTrail event history by access key in every Region for calls like RunInstances, CreateUser or PutBucketPolicy, check the IAM credential report and Cost Explorer, and delete attacker-created resources after snapshotting what you need for forensics.
- Supabase incident on February 12, 2026
Supabase mediumAdeptA new internal monitoring stack deployed into an existing AWS account used a shared construct that enabled VPC Block Public Access in block-bidirectional mode at the regional level. That cut all internet gateway traffic in us-east-2 and took down every Supabase service there for 3 hours 42 minutes. Diagnosis was slow for several reasons: alarms fired on shared services in another region, the single CloudTrail BPA event was buried among other networking changes, pre-production didn't include us-east-2, and infrastructure teams weren't paged early. Fixes include SCPs blocking region-scoped resources outside a controlled pipeline, IaC resource blocklists, separate AWS accounts for auxiliary services, external connectivity probes, pre-prod/prod region parity, and an overhaul of status-page and dashboard incident communication.
- Incident Report: October 21st Security Attack
Railway mediumAdeptAn attacker partially escaped filesystem isolation in Railway's multi-tenant build infrastructure and stole a build credential. That credential was wrongly trusted by a self-hosted Temporal cluster, which exposed build histories and a copy of Railway's internal monorepo. Using the code, the attacker found a misconfigured OIDC binding in CI/CD, obtained cloud credentials, and SSHed into an orchestration machine. From there they read envelope-encrypted environment variables and decrypted them through the KMS, targeting AI provider keys for at most 1.85% (~100,000) of workspaces. Railway halted builds twice, revoked all credentials, rebuilt its PKI, reset 1,852 linked-account tokens, and coordinated key revocation with providers after an estimated ~$740,000 in unauthorized spend.
- Tale of 'metadpata': the revenge of the supertools
Zalando Engineering mediumAdeptA one-character typo turning the "metadata" key into "metadpata" in a YAML config caused Zalando's AWS account-management tool to treat the configuration as "no accounts" and then decommission all accounts. It deleted Route 53 hosted zones and took the shop offline for hours during Cyber Week preparation. The postmortem names such large-scale automation "supertools" and describes the fixes. These include a one-week "scream test" before account deletion using Network ACLs and DNS delegation removal, and manual deletion of low-savings resources. Changes now go through jsonschema and cfn-lint validation in pre-commit hooks and CI, a GitHub bot that requires owner approvals, CloudFormation ChangeSet previews in PRs, and phased rollout through release channels of account categories.