Amazon CloudWatch Logs and Alarms
This solution captures application and service logs by creating CloudWatch logs groups in your account. By default, logs are kept indefinitely and never expire. You can adjust the LogRetentionPeriod parameter for each log group, keeping the indefinite retention, or choosing a retention period between on day and 10 years based on your requirements.
CloudWatch alarms help you monitor the solution’s functional and security assumptions are being followed. Following CloudWatch metrics can be leveraged with API Gateway to monitor client/server errors.
What is Amazon CloudWatch Logs?
Amazon API Gateway dimensions and metrics
Creating CloudWatch alarms to monitor API Gateway