ACloudGuru / serverless-plugin-cloudwatch-sumologic

Plugin which auto-subscribes a log delivery lambda function to lambda log groups created by serverless
MIT License
12 stars 15 forks source link

Not working for second time #14

Open ghorui opened 7 years ago

ghorui commented 7 years ago

I tried this plugin.. Changes are as follows. Package.json: "devDependencies": { "serverless-plugin-cloudwatch-sumologic": "0.0.10" }

serverless.yml: custom: defaultStage: dev defaultRegion: us-east-1 AIRID: '****' projectName: "4592_${self:service}" shipLogs:

Required

    arn: "arn:aws:lambda:us-east-1:****:function:Cloud***-dev-pushLogs***"

plugins:

When I deployed this project. The Subscription was successful. but the SID created is with one shortid (append at last). (Not sure from where it is getting populated).

Now I have removed the subscription from the aws console and re-deploy the function again. First: when I removed the subscription manually, the corresponding entry in Function Policy file did not reverted back. Second: When I re-deploy the code, subscription did not take place. Third: I tried re-deploying after flushing the function policy file with "aws lambda remove-permission" command. In this case also the subscription did not take place.