# help with a cloudwatchevent\_rule problem

**URL:** <https://forum.ansible.com/t/help-with-a-cloudwatchevent-rule-problem/25551>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [September 21, 2017, 8:05am UTC](https://forum.ansible.com/t/help-with-a-cloudwatchevent-rule-problem/25551 "2017-09-21T08:05:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derek\_Gibson](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Derek\_Gibson](https://forum.ansible.com/u/Derek_Gibson)\
**Post date:** [September 21, 2017, 8:05am UTC](https://forum.ansible.com/t/help-with-a-cloudwatchevent-rule-problem/25551/1 "2017-09-21T08:05:59Z")

</div>

I want to be able to update ecs scheduled tasks via ansible, using

- cloudwatchevent\_rule:

name: ansitest  
schedule\_expression: “cron(0 20 \* \* ? \*)”  
description: test from ansible  
targets:

- id: ansitest  
arn: arn:aws:ecs:us-east-1:111111111:cluster/ecs-cluster-test  
ecs\_parameters:  
task\_definition\_arn: arn:aws:ecs:us-east-1:11111111:task-definition/some-app:123  
task\_count: 1

am getting the following error:

ClientError: An error occurred (ValidationException) when calling the PutTargets operation: TaskDefinitionArn is empty for target ansitest

My questions -  
Firstly, is cloudwatchevent\_rule the correct command for updating ecs scheduled tasks?  
Secondly, is the format above correct?

thanks  
Derek

---

<div class="post-metadata">

**Author:** ![Derek\_Gibson](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@Derek\_Gibson](https://forum.ansible.com/u/Derek_Gibson)\
**Post date:** [September 21, 2017, 8:11am UTC](https://forum.ansible.com/t/help-with-a-cloudwatchevent-rule-problem/25551/2 "2017-09-21T08:11:54Z")

</div>

The below error was on 2.3.2.0  
I just upgraded to 2.4.0.0 and got the following -

`The error was: Unknown parameter in Targets[0]: "EcsParameters", must be one of: Id, Arn, Input, InputPath`

So is this maybe a bugged/broken feature?
