In the AWS Amplify dashboard I can't see a way to access my /api/* route logs after deploying a hello world NextJS application. Where would these be located?
Steps:
export default (_, res) => res.send("hello world")Can't find the logs for this lambda function nor find it anywhere in AWS or the Amplify dashboard. Even after enabling "Amplify Studio" I can't see it listed under 'Functions' but obviously I can call the endpoint without enabling Amplify Studio at all.
I can see a handler for /api/* in cloudfront distribution but can't find where the handler is.
Once is deployed with Amplify, go to the build page and look in the Deploy tab. You will find a row that says [INFO]: - API Lambda@Edge: xxxxxxx-xxxxxxx. The ID you see will be needed to identify the logs inside AWS CloudWatch.
The logs can be found going to CloudWatch -> Log groups and then you can find the API logs following this pattern: /aws/lambda/<region: this will probably be 'us-east-1'>.xxxxxxx-xxxxxxx
Amplify now provides an easy shortcut to go straight to the cloudwatch logs:

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