I could not find any documentation related to how we can use existing cloudwatch event rules via arns similar to how we can use existing sqs queues:
functions: compute: handler: handler.compute events: - sqs: arn:aws:sqs:region:XXXXXX:MyFirstQueue
I did find a serverless plugin related to this but haven’t gotten the chance to try it yet that too follows a similar approach:
plugins: - serverless-plugin-existing-cloudwatch-rule functions: counter-lambda: handler: src/counter-lambda.handler events: - cloudWatchRuleArn: 'arn:aws:events:us-east-1:160879880353:rule/my-project-PDTMidnightSchedule-42UGHOTBBVIET'
What I wanted to know if there’s a way to do this without the use of any plugins? Maybe I am missing out on any piece of documentation that shows how we can do this?
Thanks in advance!