To allow the CloudWatch Lambda to filter logs, you'll need the following IAM policy attached to it's role:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
You may need to edit the function in the following places based on the slot/variable names you choose in NLX Studio:
Replace the logGroups
map with your log group names and aliases. [cloudwatch.js - lines 12-14]
You may need to edit the function in the following places based on the payload names you choose in NLX Studio:
Make sure to add the Slack incoming webhook path as the SLACK_WEBHOOK_PATH
environemnt variable to your Lambda function. [slack.js - line 6]