Custom Gateway Response message in cloud watch Logs

123 Views Asked by At

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.

1

There are 1 best solutions below

1
Justin On

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