Interview AWS

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.

Preparing for an interview?

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

← All AWS questions