I need to be able to see the logs for my calls on AWS API Gateway
. When I perform the calls from within Gateway's Dashboard I can see them under the Logs
section.
How can I see them for external call (e.g.: calls made using curl
)?
I tried enabling CloudWatch but I can only see the metric, and not the actual log messages.
The most likely reason for not being able to see API Gateway logs in CloudWatch logs is that you haven't specified the ARN of an IAM role that enables API Gateway to write information to CloudWatch Logs.
You then need to explicitly enable logging on each Stage. You don't need to (re)Deploy the API, just Save.
Detailed instructions here: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-using-console
Once enabled you will get a log group named "/aws/apigateway/welcome" with a log line confirming logs are enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With