Warning This approach has been superceeded by the official Sumo Logic plugin and is no longer recommended. This package is no longer maintained.
This Serverless plugin deploys Cloudformation Stack with resources required to send Cloudformation Logs to Sumologic. This stack uses AWS Lambda to subscribe to your CloudWatch Log Group and POSTs the log data directly to Sumo HTTP Source.
You can read about it more here.
$ yarn add --dev serverless-plugin-sumologic
Add the following configuration to your serverless.yml
.
plugins:
- serverless-plugin-sumologic
custom:
sumologic:
name: sumologic-logs
endpointUrl: sumologic-http-endpoint
includeLogGroupInfo: true
Run yarn sls deploy
to deploy your serverless stack and sumologic stack.
OR
Run yarn sls deploy sumologic
to deploy just the sumologic stack without deploying your serverless stack.
- name: Required (Must be unique per account if you are deploying multiple stacks)
- endpointUrl: Required (Sumologic HTTP endpoint)
- includeLogGroupInfo:: Optional
Note: Camelcase version of property name
is used to prefix all stack resource logical ids and output variables.
service: serverless-example
frameworkVersion: ">=3.23.0 <4.0.0"
provider:
name: aws
runtime: nodejs16.x
region: us-east-1
plugins:
- serverless-plugin-sumologic
custom:
sumologic:
name: sumologic-logs
endpointUrl: sumologic-http-endpoint
includeLogGroupInfo: true
functions:
myfunction:
handler: src/index.handler
memorySize: 1536
timeout: 30
Feel free to use the code, it's released using the MIT license.