Closed kmarquardsen closed 6 years ago
I didn't use plugins before but I think there should be no difference, you just have to add them to the serverless yaml configuration file.
I think my confusion is that most of the plugins setup instructions involve a npm --save-dev
We are using a few plugins such cloudwatch log forwarders, I can put up some example code.
but @cristim is right, you should be able to just put them in the serverless.yml
Currently my teams at work are using https://github.com/amplify-education/serverless-log-forwarding in production with serverless-golang. With the following syntax:
plugins:
- serverless-log-forwarding
custom:
logForwarding:
destinationARN: {"Fn::ImportValue": "${env:SUMOLOGIC_LAMBDA_ARN_EXPORT_NAME}"}
And the destination lambda is https://github.com/amaysim-au/serverless-sumologic. Of course you can point this to your own lambda and use a full ARN instead of the Cloudformation ImportValue
.
I'm not sure if they did use npm install
since it wasn't specified in their Makefile
. But the yunspace/serverless-golang
container does have node runtime if needed. I'm going to close this for now since whichever plugin I choose as an example will involve various external setup which are outside the scope of this library.
Feel free to raise a issue if a specific plugin doesn't work as expected with this library.
how would you include something from https://github.com/serverless/plugins?