adapter-aws-lambda-serverless icon indicating copy to clipboard operation
adapter-aws-lambda-serverless copied to clipboard

Return helpful response if any required header is missing

Open gr2m opened this issue 4 years ago • 4 comments

follow up to https://github.com/probot/adapter-aws-lambda-serverless/pull/63

/cc @axel3rd I think that would have saved you a lot of headache.

gr2m avatar Feb 23 '21 18:02 gr2m

Yes 🤯 ^^, but could be part of #60

axel3rd avatar Feb 23 '21 18:02 axel3rd

yes I agree. I'm just not sure how pointing to https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html would be helpful?

AWS Lambda automatically monitors Lambda functions on your behalf, reporting metrics through Amazon CloudWatch. To help you troubleshoot failures in a function, Lambda logs all requests handled by your function and also automatically stores logs generated by your code through Amazon CloudWatch Logs.

gr2m avatar Feb 23 '21 18:02 gr2m

I'm just not sure how pointing to https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html would be helpful?

IMO, the CloudWatch logs is easy to access from Monitoring Tab (and not sure than Lambda Insight can be relevant here).

Using Probot log can do the job (log.debug for input event, log.error in the error catch). And the HTTP content can depend of API integration (for sample I have never viewed a ooops message).

AWS Lambda automatically monitors Lambda functions on your behalf, reporting metrics through Amazon CloudWatch. To help you troubleshoot failures in a function, Lambda logs all requests handled by your function and also automatically stores logs generated by your code through Amazon CloudWatch Logs.

axel3rd avatar Feb 23 '21 18:02 axel3rd

so in case of an error response, shall we include a JSON key such as

{
  "error": "...",
  "documentation_url": "https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html"
}

gr2m avatar Feb 23 '21 19:02 gr2m