Security & DevSecOps Practical By Samson Tanimawo, PhD Published Dec 24, 2025 4 min read

IAM Condition Keys for Least Privilege

Conditions tighten policies. The high-impact conditions.

aws:SourceIp

Most teams write IAM policies that grant a role permissions on resources. The Action and Resource elements get most of the attention; the Condition element gets ignored. That is a mistake. Condition keys are how you turn a coarse "this role can access these resources" into a precise "this role can access these resources, only from these networks, only with MFA, only during business hours, only to specific IDs." They are the surgical scalpel of IAM.

What aws:SourceIp does:

aws:SourceIp is the simplest and one of the most effective condition keys. The cost is a few lines of YAML; the protection is permanent.

aws:SourceVpc

aws:SourceVpc is the network-aware condition for VPC-internal traffic. Where SourceIp uses public IP addresses, SourceVpc uses VPC IDs. The condition limits access to requests that originated inside specified VPCs.

aws:SourceVpc is the network-segmentation condition for AWS-internal traffic. It complements aws:SourceIp; both restrict origin, at different layers.

aws:MultiFactorAuthPresent

The strongest condition key for sensitive actions is aws:MultiFactorAuthPresent. The condition requires that the calling identity authenticated with MFA recently (within the configured window). Actions that are particularly dangerous (production changes, IAM modifications, unencrypted data exports) become impossible without active MFA.

IAM condition keys are the difference between a policy that grants access broadly and one that grants access precisely. Nova AI Ops audits IAM policies for missing condition keys on sensitive actions, surfaces the cases where production policies do not require MFA on dangerous operations, and tracks the condition coverage over time so the IAM posture matures rather than drifts.