Giter VIP home page Giter VIP logo

serverless-log-forwarding's Introduction

serverless-log-forwarding

serverless MIT licensed Codacy Badge Build Status npm version npm downloads

Serverless plugin for forwarding CloudWatch logs to another Lambda function.

About Amplify

Amplify builds innovative and compelling digital educational products that empower teachers and students across the country. We have a long history as the leading innovator in K-12 education - and have been described as the best tech company in education and the best education company in tech. While others try to shrink the learning experience into the technology, we use technology to expand what is possible in real classrooms with real students and teachers.

Getting Started

Prerequisites

Make sure you have the following installed before starting:

Installing

To install the plugin, run:

npm install serverless-log-forwarding

Then make the following edits to your serverless.yaml file:

plugins:
  - serverless-log-forwarding

custom:
  logForwarding:
    destinationARN: '[ARN of Lambda Function to forward logs to]'
    # optional:
    roleArn: '[ARN of the IAM role that grants Cloudwatch Logs permissions]'
    filterPattern: '[filter pattern for logs that are sent to Lambda function]'
    normalizedFilterID: true # whether to use normalized function name as filter ID
    stages:
      - '[name of the stage to apply log forwarding]'
      - '[another stage name to filter]'

functions:
  myFunction:
    handler: src/someHandler
    # optional properties for per-function configuration:
    logForwarding:
      # set enabled to false to disable log forwarding for a single given function
      enabled: false

Running Tests

To run the test:

npm test

All tests should pass.

If there is an error update the node_module inside the serverless-log-forwarding folder:

npm install

Deploying


The plugin will be packaged with the lambda when deployed as normal using Serverless:

serverless deploy

Responsible Disclosure

If you have any security issue to report, contact project maintainers privately. You can reach us at [email protected]

Contributing

We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you:

  1. For any sizable change, first open a GitHub issue to discuss your idea.
  2. Create a pull request. Explain why you want to make the change and what it’s for. We’ll try to answer any PRs promptly.

serverless-log-forwarding's People

Contributors

alexdebrie avatar aoskotsky-amplify avatar codacy-badger avatar dariuscox avatar domaslasauskas avatar interisti avatar jconstance-amplify avatar majones-amplify avatar robertonovelo avatar sidgonuts avatar sonictrio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.