Interview Prep/DevSecOps/Rapid-Fire Tool Questions

How do you test whether an IAM role is allowed an action before deploying?

AdvancedProductionRapid-Fire Tool Questions
Answer
aws iam simulate-principal-policy \
  --policy-source-arn arn:aws:iam::111122223333:role/payments-api \
  --action-names s3:GetObject kms:Decrypt \
  --resource-arns arn:aws:s3:::prod-payments/invoices/1.pdf

The simulator evaluates identity policies and permission boundaries; SCPs, RCPs and resource policies may still deny in reality, so confirm critical paths in a test account.

All DevSecOps questions

More on Rapid-Fire Tool Questions