I’m trying to set up some AWS Lambda jobs, some of which should be triggered by new objects being put in S3, and some of which should be triggered by CloudWatch Events.
I’ve successfully created the lambda job, IAM roles, policies, and cloudwatch events rules, such that Ansible can set up about 95% of this. However, I’m having trouble automating the last step, which is to actually wire the trigger (either S3 or Cloudwatch Events) to the lambda job.
I need to finish this process in the AWS console (or, at least, I can’t figure out how to do it with ansible): https://monosnap.com/file/KsDO5kK1OE9Ivsft2RdYRwgj1ydKN7
I’ve used the cloudwatchevent_rule
module to set up the events, and I’ve granted the S3 bucket or cloudwatch events (respectively) permission to trigger my job using the lambda_policy
module.
The lambda_event
module looks close to what I want, but it seems to only work doe DynamoDB or Kinesis streams.
Is it possible to do this with Ansible, or is this an area that just has not been implemented yet? I noticed that many of these lambda-related modules are quite new, so perhaps I’m in frontier-space here?
Thanks!