560056 (3) [Avatar] Offline

i have some problems with the process_all.js from yan. I configured a cloudTrail and also a CloudWatch Event Rule. But when i start node process_all.js i geht the following error: "Could not execute the lambda function. Make sure you have given CloudWatch Logs permission to execute your function.". Also im a bit curious what needs to be filled for the funcName in process_all.js

Thanks and Regards,
Yan Cui (71) [Avatar] Offline
That error means you haven't given CloudWatch Logs the permission to invoke the log shipping function, see this snippet.
532789 (7) [Avatar] Offline
I have exactly the same question regarding to the funcname, also I'm getting the same error, the permissions are set as the snippet shows, any idea?
Yan Cui (71) [Avatar] Offline
Ah I see, so maybe you're both getting that error because the funcName is slightly different to what is actually deployed.

Have a look at the serverless.yml and see what is the "service" attribute, mine is "cloudwatch-logs-to-logzio". If you had deployed the log shipping function with a stage name "dev" then the funcName should be "cloudwatch-logs-to-logzio-dev-ship-logs-to-logzio".

Go to the Lambda console, and look for this function, take its name and that's what you should use for funcName.
532789 (7) [Avatar] Offline
excelent! I went to the console and it is deployed as `cloudwatch-logs-dev-ship-logs-to-logzio`, therefore, that is the `funcName` value, it works now! thank you!
560056 (3) [Avatar] Offline
yep, helped me also. Thank you!