title: Manually propagate upstream downstream relationship in AWS X-Ray
body: <p>I am building a system that goes something like:</p>
  
  <pre><code>                                  /-&gt; Stream to Lambda -&gt; DynamoDB
  API Gateway -&gt; AWS Lambda -&gt; DynamoDB
                                    \-&gt; Stream to Lambda -&gt; DynamoDB
  </code></pre>
  
  <p>So an API Gateway call triggers a lambda which saves to DynamoDB. Other lambdas are triggered by that DynamoDB save which do some computation and save new data to dynamodb</p>
  
  <p>I've added AWS X-Ray tracing but AWS X-Ray shows this as three different trees:</p>
  
  <ul>
  <li>API Gateway to Dynamo</li>
  <li>'Clients' -> Lamdba -> DynamoDB</li>
  <li>'Clients' -> Lamdba -> DynamoDB</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/g3UOG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g3UOG.png" alt="the service map"></a></p>
  
  <p>In the image the bottom trace is triggered by API Gateway but the first two are triggered by DynamoDB and then write back to it</p>
  
  <p>If I pass the trace ID manually through DynamoDB to the downstream lambdas is there a way I can tell x-ray that the downstream lambdas are flowing from DynamoDB?</p>