What is the difference between KMS and Secrets Manager?
AWS · Advanced level
Answer
KMS manages encryption keys; Secrets Manager stores and rotates secrets. Secrets Manager often uses KMS underneath, but it is the secret lifecycle and retrieval service, while KMS is the key control plane.
Technical explanation
A workload may need both secretsmanager:GetSecretValue and kms:Decrypt to read a secret encrypted by a customer-managed key.
Key and secret controls must combine IAM policy, resource policy, KMS key policy, rotation, audit logging, and application refresh behavior.
Do not confuse encryption with authorization: encrypted data is still exposed if decrypt and read permissions are too broad.
Secret rotation must include monitoring and rollback because a failed rotation can become a production outage.
Hands-on example
1. Create a test KMS key, secret or parameter, IAM role, and workload that retrieves the value at runtime.
2. Scope permissions to the specific secret/parameter and KMS key, then test allowed and denied reads.
3. If rotation is relevant, run a manual rotation and confirm the application refreshes safely.
4. Add CloudTrail/CloudWatch alarms for failed rotation, denied decrypts, and suspicious access.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More AWS interview questions
- What is the difference between Secrets Manager and SSM Parameter Store?
- What is a CloudFormation change set and a drift detection?
- Compare backup-and-restore, pilot light, warm standby, and multi-site DR strategies.
- How do you detect and reduce unexpected AWS cost increases?
- What is the difference between an SQS standard and FIFO queue?
- What is AWS Systems Manager, and how is Session Manager safer than SSH bastions?
- What is an AMI, and how do you build standardised, hardened images?
- How do you troubleshoot an EC2 instance that is unreachable over SSH?