How do you look at console.log output of the amazon lambda function

前端 未结 4 2281
太阳男子
太阳男子 2021-02-12 09:45

When you do a

console.log(\'Loading function\');

in an amazon lambda function, where does that go?

My setup api gateway lambda functio

4条回答
  •  梦毁少年i
    2021-02-12 10:23

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

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

    If you prefer to retrieve CloudWatch Logs outside of the AWS Console, then there are numerous CLI options:

    • awscli: aws logs get-log-events
    • github: jorgebastida/awslogs
    • github: TylerBrock/saw
    • serverless: sls logs (if using serverless)
    • samcli: sam logs (if using SAM)

提交回复
热议问题