A developer wants an AWS Lambda function written with the AWS SDK for Node.js to appear in the AWS X-Ray service map with its downstream Amazon DynamoDB calls shown as separate timed subsegments. After deploying, no traces appear in the X-Ray console at all. Which TWO configuration steps are required for the function to publish segments and capture the DynamoDB call as a subsegment? (Select TWO.)
- AEnable Active tracing in the function configuration so Lambda creates and emits the request segment to X-Ray. Correct
- BWrap the AWS SDK client with the X-Ray SDK (capture the AWS client) so each DynamoDB call is recorded as a subsegment. Correct
- CGrant the execution role dynamodb:DescribeTable so X-Ray can read the table's metadata for the service map.
- DAdd an X-Ray annotation named dynamodb to the segment so the DynamoDB subsegment becomes visible on the service map.
- EIncrease the function timeout so the trace has time to flush before the execution environment is frozen.
Why A is correct: With Active tracing on, the Lambda service opens the segment and sends it to X-Ray; without it the SDK has no parent segment to attach subsegments to and nothing reaches the console.
Why B is correct: Patching or capturing the AWS SDK client is what instruments the DynamoDB call, producing the timed subsegment that appears as a downstream node on the service map.
Why C is wrong: X-Ray does not call DynamoDB to build the map; this permission is unrelated, and the missing-traces symptom stems from tracing setup, not table metadata access.
Why D is wrong: Annotations index values for filter expressions; they neither create subsegments nor cause downstream nodes to appear, so this does not capture the call.
Why E is wrong: A longer timeout sounds like it would help flushing, but Lambda emits the segment as part of the managed lifecycle; the traces are absent because tracing was never enabled and the client was not instrumented.