title: How to extract event relayed from AWS EventBridge to ECS Fargate
body: <p>I articulate the question as follows:</p>
  
  <ol>
  <li><p>Is the EventBridge event relayed to the ECS Task?  (I can't see how much useful it could be if the event is not relayed). </p></li>
  <li><p>If the event is relayed, then how to able to extract it from within say a Node app running as Task. </p></li>
  </ol>
  
  <p><strong>Some Context is Due:</strong> It is possible to set an EventBridge rule to trigger ECS Fargate Tasks as the result of events sourced from, say, CodeCommit. Mind you, the issue here is the sink/target, not the source. I was able to trigger a Fargate Task as I updated my repo. I could have used other events. My challenge resides in extracting the event relayed (in this case, repository name, commitId, etc from Fargate.)</p>
  
  <p>The EventBridge documentation is clear on how to set the rules to trigger events but is mum on how events can be extracted - which makes sense as the sink/target documentation would have the necessary reference. But ECS documentation is not clear on how to extract relayed events. </p>
  
  <p>I was able to inspect the metadata and process.env. I could not find the event in either of the stores. </p>
  
  <p>I have added a CloudWatch Log Group as a target for the same rule and was able to extract the event. So it certainly relayed to some of the targets, but not sure if events are relayed to ECS Task. </p>
  
  <p>Therefore, the questions arise: is the event relayed to the ECS Task? If so, how would you access it? </p>