AWS Certified Database – Specialty — Question 24
A Database Specialist has migrated an on-premises Oracle database to Amazon Aurora PostgreSQL. The schema and the data have been migrated successfully.
The on-premises database server was also being used to run database maintenance cron jobs written in Python to perform tasks including data purging and generating data exports. The logs for these jobs show that, most of the time, the jobs completed within 5 minutes, but a few jobs took up to 10 minutes to complete. These maintenance jobs need to be set up for Aurora PostgreSQL.
How can the Database Specialist schedule these jobs so the setup requires minimal maintenance and provides high availability?
Answer options
- A. Create cron jobs on an Amazon EC2 instance to run the maintenance jobs following the required schedule.
- B. Connect to the Aurora host and create cron jobs to run the maintenance jobs following the required schedule.
- C. Create AWS Lambda functions to run the maintenance jobs and schedule them with Amazon CloudWatch Events.
- D. Create the maintenance job using the Amazon CloudWatch job scheduling plugin.
Correct answer: C
Explanation
The correct answer, C, is ideal because AWS Lambda provides a serverless architecture that minimizes maintenance and is highly available. Option A requires managing an EC2 instance, which increases maintenance overhead, while B suggests using cron jobs directly on the Aurora host, which is not possible as Aurora does not support this. Option D does not provide the same level of flexibility and ease of management as Lambda functions with CloudWatch Events.