0
votes

I have a lambda created by following aws tutorial on how to create a scheduler to trigger lambda.

I have checked several times to make sure the lambda has the suggested role properties that tutorial mentions with the scheduler and a permission to the scheduler. I have them all deployed as a stack via CloudFormation Template. Unfortunately I cannot share the CFT, you just have to trust me on this.

I am looking for possible reasons that could cause what I see, which is on every invocation coming from CloudWatch Events there is an invocation error recorded on the monitoring tab of my lambda page. Unfortunately nothing is being logged and I do not have CloudTrail enabled to have anyway to troubleshoot this via logs.

To sum up, stack has:

  • Lambda function X
  • CloudWatch Events scheduler to call function X every some minutes
  • Permission to the scheduler to invoke lambda
  • Lambda role

I cannot share the CFT but it is pretty much same as what this blog mentions.

1
What happens when you try to invoke manually?Brandon Miller
Manual invocation work fine.Griffin
Whats the output of aws lambda get-policy --function-name <name> for your function?Brandon Miller
@BrandonMiller Unfortunately this is a restricted account and I would not be able to run that command with my user. I am basically looking for an answer which would list possible causes. I understand it requires trouble shooting, but I have limited access.Griffin
@Griffin you can't troubleshoot without access to the things you're trying to troubleshoot.Michael - sqlbot

1 Answers

0
votes

This problem was resolved after it was found that the role assumed by lambda did not have logging permission due to typo mistake which was masking the underlying errors.

After fixing the logging issue it was clear that the invocation errors where due to restrictions on the role assumed by lambda.