Interview Prep/AWS/Observability, Security Services and IaC

How do KMS key policies differ from IAM policies?

AdvancedConceptObservability, Security Services and IaC
Answer

Every KMS key has a key policy, the primary access control: if it does not allow the principal (or delegate to IAM by granting the account root kms:*), IAM policies alone cannot grant access. The default policy delegates to IAM. Grants are programmatic, revocable, temporary permissions often used by AWS services (EBS attaching an encrypted volume).

Cross-account use needs both the key policy to allow the external principal and that account's IAM policy to allow kms:Decrypt etc. Deleting a key has a 7 to 30 day waiting period.

aws All AWS questions

More on Observability, Security Services and IaC