I would like to user custom messages in AWS API Gateway responses, am i am able to set them easily. But i would require to log these custom message cloud watch logs. Request suggestion on the same. I am able to access $context variable for cloud watch logging, but custom message we set are no part of these $context variable.
Asked
Active
Viewed 107 times
1 Answers
-1
You can publish Custom Metric Data into ColudWatch like this page said: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-cloudwatch-publish-custom-metrics.html

Justin
- 1,050
- 11
- 26
-
Sorry, To detail more, there are default response messages in AWS API Gateway, you can override them with custom gateway responses in API gateway, this comes into picture, after your code execution, my question is not about custom metrics, logging these custom response messages in cloud watch logs, as per current analysis there is no way to achieve this, if anyone has solution it would be great. – santosh Feb 12 '20 at 13:01