AWS amplify console.log() from backend side

Viewed 969

I have set up a serverless express function (integrated with API gateway) using "amplify add api". If I log something from one of the routes for example:

app.get('/items', function (req, res) {console.log('hello')}

Where do I find the hello?

2 Answers

You can view the console.log() using AWS CloudWatch Logs.

But as you want to view the logs from your terminal I would recommend using awslogs.

They are logged to CloudWatch, but they might be in a different region from your application (try Oregon).

Related