Diagnose Control Error

In this guide, you will diagnose a control error using the Guardrails console and, when the console log isn't enough, the AWS CloudWatch log groups behind it.

When diagnosing error messages in the Guardrails console, control logs typically provide enough information to identify the root cause. In some cases you need more detail than the console surfaces, which you can retrieve from the CloudWatch log group for the worker that ran the control.

Prerequisites

Step 1: Find the Control in Error

Select Controls in the sidebar and drill into the provider you're troubleshooting. On the node's Controls tab, switch the scope to Descendant, then use the State filter to select Error. Select a control to open its detail page, where the Control tab leads with the error and its reason.

Control detail page in Error state showing the error reason

Step 2: Open the Process Log

The full log lives on the process that ran the control. Click VIEW LOG, or the Last run link in the header, to open the process on its Logs tab.

Process log for the errored control at Info level

Set the Level filter to Debug and above, then click the error entry to expand it. The expanded payload carries the fields you need for the next steps: the errorId, the type (for example worker), and the version of the code that ran.

Expanded error entry showing the errorId, type worker, and version fields

When the payload doesn't explain the failure on its own, as here, use these fields to trace the error in the AWS CloudWatch log groups.

Step 3: Access AWS Console

Open the AWS Console and navigate to the CloudWatch service in the region where Guardrails is deployed.

Guardrails Console Login

Step 4: Navigate to Log Groups

Choose Log Groups from the left navigation menu.

Navigate to Log Groups

Step 5: Search Log Group

Search for log groups using the version from Step 2. This renders a list of matching log group names with the prefix /aws/lambda/turbot_ followed by that version.

Search Log Group

Step 6: Select Log Group

Select the log group matching the type field from the error entry, for example /aws/lambda/turbot_5_59_0_worker for a worker error. Choose Search all log streams.

Worker Log Group

Step 7: Search Error

Search using the errorId from Step 2.

[!NOTE] Ensure to provide the errorId in double quotes e.g. "3423432-dfdsf-3e331-fgdfgd234234"

Search with Error Id

Step 8: Find Error Details

Collapse the search result to view the full error details.

Error Details

After reviewing the detailed error message, use the information to identify the root cause and take the necessary corrective actions.

If you encounter any further issues, please Open Support Ticket and attach the relevant information to assist you more efficiently.