How do you rotate and manage access keys, and why prefer roles over long-lived keys?
AWS · Advanced level
Answer
I prefer roles and federation over long-lived access keys. If keys are unavoidable, I scope permissions, store securely, monitor last use, rotate with validation, disable before deletion, and alert on old or unused keys.
Technical explanation
OIDC federation for CI/CD is safer than storing static AWS keys in pipeline variables.
Multi-account governance should combine preventive controls such as SCPs with detective controls such as Config, GuardDuty, Inspector, Security Hub, CloudTrail, and Access Analyzer.
Central security, logging, and networking accounts reduce blast radius and protect evidence from workload account compromise.
Every control needs an owner, exception process, alert route, and remediation workflow or it becomes shelfware.
Hands-on example
1. Create a multi-account sandbox or use separate dev/security/logging accounts to test the control pattern.
2. Enable the relevant organization-level service or guardrail, then generate a controlled finding or denied action.
3. Route findings to Security Hub, EventBridge, ticketing, SIEM, or an incident channel with ownership metadata.
4. Document the exception process, remediation automation, and evidence required for audit.
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 a service quota and a rate limit, and how do you handle throttling?
- How do you troubleshoot an EC2 instance that is unreachable over SSH?
- What is an AMI, and how do you build standardised, hardened images?
- What is AWS Systems Manager, and how is Session Manager safer than SSH bastions?
- What is the difference between an SQS standard and FIFO queue?
- How do you detect and reduce unexpected AWS cost increases?
- Compare backup-and-restore, pilot light, warm standby, and multi-site DR strategies.
- What is a CloudFormation change set and a drift detection?