I am trying to deploy aws FargateScheduledTask service using CDK python. I am unable to see the role property in the patterns.ScheduledFargateTask constructor to assign the events role. Please can you let me know what I am missing here.
# Create schedule task
scheduledtask = patterns.ScheduledFargateTask(
self, "Fargate_Service",
cluster=cluster, # Required: Provide the cluster
scheduled_fargate_task_definition_options=scheduled_task,
schedule=autoscaling.Schedule.expression("cron(30 11,12 * * ? *)"), # Required: Define the schedule
desired_task_count=1,
security_groups=[ecs_sg],
**role=eventrole** ------- This one
)