AWS Certified Database – Specialty — Question 162
A database specialist needs to configure an Amazon RDS for MySQL DB instance to close non-interactive connections that are inactive after 900 seconds.
What should the database specialist do to accomplish this task?
Answer options
- A. Create a custom DB parameter group and set the wait_timeout parameter value to 900. Associate the DB instance with the custom parameter group.
- B. Connect to the MySQL database and run the SET SESSION wait_timeout=900 command.
- C. Edit the my.cnf file and set the wait_timeout parameter value to 900. Restart the DB instance.
- D. Modify the default DB parameter group and set the wait_timeout parameter value to 900.
Correct answer: A
Explanation
The correct answer is A because creating a custom DB parameter group allows for persistent configuration changes that can be applied to the RDS instance. Option B only sets the timeout for the current session and does not affect future connections, while option C is not applicable to RDS as you cannot edit my.cnf directly. Option D is incorrect since default parameter groups cannot be modified directly.