Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Updated the plugin to work with Serverless > 1.25.0 (#15)
Browse files Browse the repository at this point in the history
* Adjusted template modification/output for LogicalIdCasing, minimized lodash dependency

* Updated the properties added to the CF template, as well as Resource and LogicalId casing. Added some unit tests

* Updated test script for yarn

* Update README.md

* tabs -> spaces
  • Loading branch information
louisnk authored and johncmckim committed Jun 14, 2018
1 parent b3c3f20 commit 51fb833
Show file tree
Hide file tree
Showing 7 changed files with 1,591 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 4.3.2
- 4
deploy:
provider: npm
email: accounts@acloud.guru
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Plugin which auto-subscribes a log delivery lambda function to lambda log groups
2. Add the following custom variables to your `serverless.yml` file.

```yaml
plugins:
- serverless-plugin-cloudwatch-sumologic

custom:
shipLogs:
# Required
Expand All @@ -29,16 +32,22 @@ Upon running `sls deploy` it will...
1. if no existing cloudwatch function is specified
1. Create a temporary function in the root of your serverless project
2. Add that function to the in-memory CloudFormation script created by the serverless framework
3. Iterate through all the functions (except for the sumologic one) and generate:
1. CloudFormation Subscription Filter resources linking the log groups created by serverless framework to the sumologic lambda function.
4. Wait for the stack creation/update to complete and then delete the temporarily created function source directory.
2. Iterate through all the functions (except for the sumologic one) and generate:
1. CloudFormation Subscription Filter Resource linking the log groups created by serverless framework to the sumologic lambda function.
2. Permissions to Invoke the logging function, as a Resource.
3. Wait for the stack creation/update to complete and then delete the temporarily created function source directory.

# Caveats
You must be running serverless 1.6.0 or higher.
You must be running serverless 1.25.0 or higher.

# Contribute
Please fork this repo to make changes and then issue a pull request back to this repo.
No unit tests are included at this time. Unit tests will be added before this goes into version 1.0.0

# Testing
Tests are written using Mocha, Sinon, Chai, using Rewire

Run with `npm test`

# Contributors
[Daniel Parker (@rlgod)](https://github.com/rlgod)
Loading

0 comments on commit 51fb833

Please sign in to comment.