Cloudwatch logs not created for the lambda

I have a controller with three actions in them which should get deployed to three lambda’s which it does, but only one lambda seems to be writting logs to cloudwatch. The other two do not create logs even though testing the endpoint shows they are actually firing. I can’t figure why?

Anyone have some pointers?

Jets.application.routes.draw do
post “checkfront_booking_change”, to: “checkfront#bookingchange”
post “checkfront_payment_transaction”, to: “checkfront#paymenttransaction”
get “checkfront_authentication_callback”, to: “checkfront#authenticationcallback”
end

class CheckfrontController < ApplicationController
def bookingchange
write_log “Checkfront booking change webhook triggered”
write_log “payload: #{params}”

render json: {success: true, status: 200, message: "bookingchange triggered and run without error"}    

end

def paymenttransaction
write_log “Checkfront payment transaction webhook triggered”
write_log “payload: #{params}”

render json: {success: true, status: 200, message: "paymenttransaction triggered and run without error"}    

end

def authenticationcallback
write_log “Checkfront OAuth Authentication Callback triggered”
write_log “payload: #{params}”

render json: {success: true, status: 200, message: "authenticationcallback triggered and run without error"}    

end

def write_log(text)
puts “integrations - #{text}” unless Jets.env == “test”
end
end

Wondering if calling the lambda function directly via the console of AWS cli creates the CloudWatch logs records? Would try that :ok_hand:

I am able to use AWS CLI to create log groups, and streams and write logs.
In my jets controller I have three lambdas. The log group only gets created for one lambda “bookingchange”… the other two do not get log groups even after several deploys.
And when I use postman to trigger them, I get a success response, but no logs.

Why!? So weird. Its almost like I need to redo the log group creation… but am unsure how to go about it.

Any advice?

From the sounds of it sounds like you may be using the CLI to create the log group.

Instead, wondering what happens when you hit the “Test” button in the Lambda console directly on the function. Does that in turn create a CloudWatch log entry? Debugging it like so might help figure out what’s going on. Unsure though.

Thanks for the suggestion. I triggered the Lambda on the AWS web console and I see that it gets a “Error: Route not found”. So I checked the API Gateway and the correct route is there.
I tested the route on the API Gateway itself and I get a success… but still no logs.

Very very mysterious.

Help… what shall I try? Am at the end of my wits. Need new wits