As you look at the console.log output of the Amazon lambda function

When you do

console.log('Loading function');

in the Amazonian lambda function, where does it go?

My api gateway setup lambda function nodejs6.10 curl https://n2tredacted.execute-api.us-east-1.amazonaws.com/prod/redactedFunc

+12
source share
4 answers

AWS Lambda logs are written to CloudWatch logs . Here's how to access them :

  1. select the Lambda function in the AWS console
  2. click the Monitoring tab
  3. select View Logs in CloudWatch

CloudWatch AWS, :

+8

2 -.

1 ( CLI ):

:

sls logs -f myFunctionName -t

-f , -t - .

2 ( CloudWatch):

CloudWatch , , "". .

+9

Cloudwatch> awscli:

aws logs get-log-events  --log-group-name /aws/lambda/my_group_name_here --log-stream-name stream_name_here

, $, \

+4

API Gateway, console.log Test of API. : .

, .

0

Source: https://habr.com/ru/post/1620343/


All Articles