CloudWatch Integration
Overview
CloudWatch Integration enables you to transfer logs from AWS CloudWatch to SnappyFlow. An AWS Lambda handler is specifically designed using AWS Lambda functions to integrate AWS CloudWatch and SnappyFlow.

How to Integrate?
Prerequisite
Click the below URL to download the zip file that contains the latest build of the lambda handler.
Step 1: Create a lambda function
Login into your AWS account.

Go to the AWS Lambda service and click the
Create functionbutton.In the Create function window, choose the
Author from scratchoption.In the Basic information window, enter the following details:
- Function Name: Give a meaningful function name
- Runtime: Select Go 1.x
- Architecture: Select based on your requirement
Click the
Create functionbutton.
Step 2: Add Trigger

Click the
Add triggerbutton.
In the Add trigger window, select the following details:
- Source: Select the source as CloudWatch Logs
- Log group: Select a log group
- Filter name: give a filter name based on the requirement
- Filter pattern (optional)
Click the
Addbutton.
Step 3: Enable the Lambda handler

Go to the Code > Code Source tab.
Click the
Upload frombutton and choose the.zip fileoption.Upload the
Lambda-handler.zipfile and save.
Go to Runtime settings, click the
Editbutton, and change the default handler tosfagent.
Step 4: Add Environment variables

Go to the Configuration section.
Navigate to the Environment variable tab and click on the
Editbutton.In the Edit environment variables window, click the
Add Environment variablebutton.
Add the below-mentioned environment variables.
- Key:
APP_NAME, Value: Name of the application - Key:
KEY, Value: Profile key copied from SnappyFlow - Key:
NAME, Value: Name of the Instance - Key:
PROJECT_NAME, Value: Name of the project
- Key:
- Click on the
Savebutton.
View Logs
Login into SnappyFlow.
Navigate to the Application tab > Project > Application and click the Dashboard icon.
In the Dashboard window, navigate to Log Management > Primary Storage.

In the Primary Storage window, you can see the logs transferred from CloudWatch.

To see the raw data, navigate to the Browse Data tab and enter the below details:
Index: Log
Instance: Select an instance
Plugin: cloudwatch-logs
Document Type: cloudwatchLogs