The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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 (73) [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 (73) [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!