Dev solves AWS Step Functions log chaos by reusing business ID as correlationId
A software engineer with over 15 years of experience documented a practical logging problem encountered while working with AWS Step Functions and Lambda-based pipelines. When a customer inquiry arose about an order processed 120 days earlier, the engineer found that Step Functions execution history had already expired after its 90-day retention limit, leaving only raw CloudWatch logs to investigate. The core issue was that each Lambda function logged independently with no shared format or common identifier, making it nearly impossible to reconstruct a timeline without manually opening log groups one by one. Rather than generating a new UUID as a correlationId, the engineer opted to reuse the existing business case ID already present in the workflow, avoiding the overhead of maintaining two separate identifiers. The article emphasizes that the key takeaway is the reasoning behind the approach, not a universal recipe, and explicitly notes this is not a distributed tracing solution but a targeted fix for correlating logs within a single Step Functions execution.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in