Interview › Databases & Caching
How do you encrypt an RDS instance at rest, and can you encrypt an existing unencrypted one?
Databases & Caching · Basic level
Answer
New RDS instances should be encrypted at creation with KMS. Existing unencrypted RDS storage cannot simply be encrypted in place; the normal method is snapshot, copy snapshot with encryption enabled, restore a new encrypted instance, validate, and cut over.
Technical explanation
Encryption covers storage and related backups/snapshots according to RDS and KMS behavior.
KMS key policy and cross-account or cross-Region permissions must be planned.
Because restore creates a new endpoint, cutover and rollback must be part of the migration plan.
Hands-on example
Encryption conversion example:
$ aws rds create-db-snapshot --db-instance-identifier legacy-orders --db-snapshot-identifier legacy-orders-pre-encryption
$ aws rds copy-db-snapshot --source-db-snapshot-identifier legacy-orders-pre-encryption --target-db-snapshot-identifier legacy-orders-encrypted --kms-key-id alias/rds-prod
$ aws rds restore-db-instance-from-db-snapshot --db-instance-identifier orders-encrypted --db-snapshot-identifier legacy-orders-encryptedPreparing 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 Databases & Caching interview questions
- What is a blue-green deployment for RDS, and how does it reduce upgrade risk?
- How do you monitor RDS performance (CloudWatch, Performance Insights, Enhanced Monitoring)?
- How do you perform a major version upgrade of RDS with minimal downtime?
- What is Performance Insights, and what does it help you find?
- What is an RDS option group?
- What are common causes of high RDS CPU, and how do you investigate?
- What is an RDS parameter group, and give an example of a parameter you would tune?
- How do you scale an RDS database vertically and what is the downtime impact?