AWS — Sending CloudWatch log event from Lambda (node.js)

CloudWatch : Create log group and log stream

First we create a log group named: test/log/group

Lambda : Create function

Then we go to Lambda service console to create a function, which will send log event to the log stream we just created.

IAM : Add permission to Lambda function

Lambda : execute function

In our Lambda function, we will call “putLogEvents” API to write the message to CloudWatch “test/log/stream”.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store