0

I set up a Cloudwatch trigger for my Lambda function to get files from S3, add data, and send them back to S3. It works when I hit the test button and now I want to create a Cloudwatch trigger. I set it up but it does not work as scheduled. I have got IAM account with AWSLambdaFullAccess and wonder how can I troubleshoot it and make it sure it does trigger my function?

1 Answer 1

1

sounds like a lambda permission...you need to allow cloudwatch to invoke lambda (see https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html)

something like:

aws lambda add-permission \
--function-name LogScheduledEvent \
--statement-id my-scheduled-event \
--action 'lambda:InvokeFunction' \
--principal events.amazonaws.com \
--source-arn arn:aws:events:us-east-1:123456789012:rule/my-scheduled-rule
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.