I am using a scheduled cloudwatch event to trigger my lambda function after a specific time interval. I would like to use a cloud form template to add this rule to cloudwatch. I looked through the documentation for cloudformation templates, but I canβt find out how to configure events using the cloud formation template. Can anyone suggest how to implement it using a cloud formation template.
I am using the template below.
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Provision environment specific", "Resources": { "lambdaScheduler": { "Type": "AWS::CloudWatch::Event", "Properties": { "detail-type": "Scheduled Event", "source": "aws.events", "name": "TEST_EVENT_10_MINS_RULE", "schedule-expression": "rate(5 minutes)" } } } }
I get an error A client error (ValidationError) occurred when calling the ValidateTemplate operation: Template format error: Unrecognized resource type: AWS::CloudWatch::Event
when I check it with aws cli.
source share