What should a Database Specialist do to meet these requirements with minimal effort?
Create an AWS Lambda function to pull logs from the RDS databases and consolidate the log files in an Amazon S3 bucket. Set a lifecycle policy to expire the objects after 90 days.
Modify the RDS databases to publish log to Amazon CloudWatch Logs. Change the log retention policy for each log group to expire the events after 90 days.
Write a stored procedure in each RDS database to download the logs and consolidate the log files in an Amazon S3 bucket. Set a lifecycle policy to expire the objects after 90 days.
Create an AWS Lambda function to download the logs from the RDS databases and publish the logs to Amazon CloudWatch Logs. Change the log retention policy for the log group to expire the events after 90 days.
Explanations:
Using an AWS Lambda function to pull logs from RDS and store them in an S3 bucket requires manual management. This approach is not ideal for centralized real-time analysis.
Publishing logs to CloudWatch Logs allows for centralized log management with real-time analysis. The retention policy in CloudWatch can be easily adjusted to expire after 90 days.
Writing a stored procedure for each RDS database is complex and error-prone. It requires custom development and manual management, which is not the most efficient solution.
While Lambda can be used to push logs to CloudWatch, it adds unnecessary complexity by involving both Lambda and CloudWatch, which can be simplified by directly publishing logs.