AWS Certified Database – Specialty — Question 196
An online bookstore recently migrated its database from on-premises Oracle to Amazon Aurora PostgreSQL 13. The bookstore uses scheduled jobs to run customized SQL scripts to administer the Oracle database, running hours-long maintenance tasks, such as partition maintenance and statistics gathering. The bookstore's application team has reached out to a database specialist seeking an ideal replacement for scheduling jobs with Aurora PostgreSQL.
What should the database specialist implement to meet these requirements with MINIMAL operational overhead?
Answer options
- A. Configure an Amazon EC2 instance to run on a schedule to initiate database maintenance jobs
- B. Configure AWS Batch with AWS Step Functions to schedule long-running database maintenance tasks
- C. Create an Amazon EventBridae (Amazon CloudWatch Events) rule with AWS Lambda that runs on a schedule to initiate database maintenance jobs
- D. Turn on the pg_cron extension in the Aurora PostgreSOL database and schedule the database maintenance tasks by using the cron.schedule function
Correct answer: D
Explanation
The correct answer is D because enabling the pg_cron extension allows for native scheduling of tasks within the PostgreSQL environment, minimizing the need for external resources and management. Options A and B require additional infrastructure and complexity, while option C involves using AWS Lambda and EventBridge, which adds operational overhead compared to the built-in capabilities of pg_cron.