What should the developer do to meet these requirements with the LEAST operational overhead?
Set up API Gateway health checks to monitor the application’s availability. Use the Amazon CloudWatch PutMetricData API operation to publish the logs to CloudWatch. Search and query the logs by using Amazon Athena.
Set up Route 53 health checks to monitor the application’s availability. Turn on AWS CloudTrail logs for all the AWS services that the application uses. Send the logs to a specified Amazon S3 bucket. Use Amazon Athena to query the log files directly from Amazon S3.
Configure all the application’s AWS services to publish a real-time feed of log events to an Amazon Kinesis Data Firehose delivery stream. Configure the delivery stream to publish all the logs to an Amazon S3 bucket. Use Amazon OpenSearch Service to search and analyze the logs.
Set up Route 53 health checks to monitor the application’s availability. Turn on Amazon CloudWatch Logs for the API Gateway stages to log API requests with a JSON log format. Use CloudWatch Logs Insights to search and analyze the logs from the AWS services that the application uses.
Explanations:
While this option suggests using CloudWatch for log management, it requires manual publication of logs through the PutMetricData API, which adds complexity and operational overhead. Additionally, using Amazon Athena for log querying implies that logs must be stored in S3, which is not mentioned here.
This option suggests turning on AWS CloudTrail logs and sending them to an S3 bucket. However, CloudTrail primarily logs API calls and does not capture application-specific logs from Lambda or API Gateway, making it less effective for identifying application errors. Using Athena to query S3 is feasible, but it does not provide direct access to the relevant logs.
This option introduces a complex setup with Kinesis Data Firehose and OpenSearch Service, which may be overkill for simple log management. It involves additional operational overhead to manage the Kinesis stream and OpenSearch cluster. While it could provide log analysis capabilities, it does not align with the requirement for the least operational overhead.
This option provides a straightforward solution by enabling CloudWatch Logs for API Gateway, which captures relevant API request logs. It also allows the use of CloudWatch Logs Insights, a powerful tool for searching and analyzing logs with minimal setup and operational overhead, making it the most efficient choice for identifying application errors.