Cloud security is a top priority in every AWS technical interview. Below are the most common AWS Security and IAM interview questions and how to answer them clearly.
1. What is the difference between a Security Group and a Network ACL (NACL)?
Answer: A Security Group operates at the instance or ENI level, supports allow rules only, and is stateful (return traffic is automatically allowed). A Network ACL operates at the subnet level, supports both allow and deny rules evaluated in numerical order, and is stateless (inbound and outbound rules must be configured explicitly).
2. How does AWS KMS envelope encryption work?
Answer: Envelope encryption uses a plaintext Data Encryption Key (DEK) to encrypt large data locally for speed, then encrypts that DEK using a KMS Key stored in AWS KMS. The encrypted DEK is stored alongside the ciphertext, while the plaintext DEK is discarded from memory.
3. What is an IAM Permission Boundary?
Answer: An IAM Permission Boundary is a managed policy that sets the maximum permissions an IAM user or role can have. Even if an identity-based policy grants broader access, the effective permissions are the intersection of the identity policy and the permission boundary.
4. When should you use AWS Secrets Manager vs. Systems Manager Parameter Store?
Answer: Use AWS Secrets Manager for database credentials, API keys, and OAuth tokens that require built-in automatic rotation and cross-account sharing. Use Parameter Store for application configuration values, feature flags, and standard secrets where built-in rotation isn’t required.
5. How do AWS CloudTrail and Amazon GuardDuty differ?
Answer: AWS CloudTrail records API calls and account activity for auditing and compliance. Amazon GuardDuty is an intelligent threat detection service that continuously analyzes CloudTrail logs, VPC Flow Logs, and DNS logs to alert on suspicious behavior.

