Skip to content

Commit

Permalink
Add guide > Monitoring Lambda Invocation. Closes #301
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulSrivastav14 committed Feb 27, 2025
1 parent 4e88332 commit 3048af5
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/guides/hosting-guardrails/monitoring/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ The following guides provide detailed instructions for effectively monitoring Gu
| [Investigate Event Flood](/guardrails/docs/guides/hosting-guardrails/monitoring/investigate-event-flood) | Outlines the process for diagnosing and managing event floods. |
| [Monitoring and Alarms](/guardrails/docs/guides/hosting-guardrails/monitoring/monitoring-alarms) | Guides for assessing various CloudWatch metrics provided in TE and TED stack. |
| [Workspace Health Check](/guardrails/docs/guides/hosting-guardrails/monitoring/workspace-health-check) | Guides for assessing the health of your Guardrails workspace. |
| [Mod Health Check](/guardrails/docs/guides/hosting-guardrails/monitoring/check-mod-health) | Guides for checking the health of your Mod in workspace. |
| [Mod Health Check](/guardrails/docs/guides/hosting-guardrails/monitoring/check-mod-health) | Guides for checking the health of your Mod in workspace. |
| [Investigate Lambda Invocation](/guardrails/docs/guides/hosting-guardrails/monitoring/investigate-lambda-invocation) | Guides for investigating the lambda invocations |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Monitoring Lambda Invocation
sidebar_label: Monitoring Lambda Invocation
---

# Monitoring Lambda Invocation

In this guide, you will:
- Use the AWS console to monitor the lambda invocations.

Monitoring Lambda invocations is crucial for identifying performance bottlenecks, optimizing execution, and managing AWS costs. Worker Lambda functions process [events](/guardrails/docs/guides/azure/real-time-events#configuring-real-time-events), and prolonged execution times can result from high concurrency, database overload, or excessive SQS message throughput. When durations exceed defined thresholds, they increase costs and indicate inefficiencies. Proactive monitoring helps ensure smooth execution, efficient resource utilization, and minimized costs.

## Prerequisites

- Access to the Guardrails AWS account with **ReadOnly** privileges.

## Step 1: Login to Guardrails Console

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

![AWS Console Home](/images/docs/guardrails/guides/hosting-guardrails/monitoring/investigate-lambda-invocation/aws-console-home.png)

## Step 2: Navigate to Dashboards

Choose **Dashboards** from the left navigation menu.

![Lambda Dashboard](/images/docs/guardrails/guides/hosting-guardrails/monitoring/investigate-lambda-invocation/aws-lambda-dashboard-select.png)

## Step 3: View Invocations

From `Account-level metrics`, choose **Invocations** and and set the desired date range.

![Select Invocations](/images/docs/guardrails/guides/hosting-guardrails/monitoring/investigate-lambda-invocation/aws-lambda-select-invocations.png)

## Step 4: Identify Invocation Spikes

Identify spikes in the graph for the selected time range. In this example, a spike in invocations is observed starting from `01/29/2025`.

![Identify AWS Lambda Invocations Spike](/images/docs/guardrails/guides/hosting-guardrails/monitoring/investigate-lambda-invocation/aws-lambda-invocations-spike.png)

## Step 5: Investigate and Resolve Spike

High Lambda invocations may result from `increased concurrency`, `database overload`, or `excessive SQS message` throughput, often caused by misconfigurations in the environment. One way to identify the root cause is by [analyzing event floods](/guardrails/docs/guides/hosting-guardrails/monitoring/investigate-event-flood) for spikes in specific external events, which can help pinpoint the source of increased Lambda activity.
Once the root cause is determined, apply the necessary fixes.

## Step 6: Review

- [ ] Ensure that the Lambda invocation spike stabilizes and returns to normal levels.

![lambda Invocation Resolved](/images/docs/guardrails/guides/hosting-guardrails/monitoring/investigate-lambda-invocation/aws-lambda-invocations-resolved.png)

## Next Steps

Please see the following resources to learn more about Turbot Guardrails Enterprise:

- Learn how to [Monitor Alarms](https://turbot.com/guardrails/docs/guides/hosting-guardrails/monitoring/diagnose-control-error).
- Learn how to [Diagnose Control Error](/guardrails/docs/guides/hosting-guardrails/monitoring/diagnose-control-error).

## Troubleshooting

| Issue | Description | Guide |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| Common errors. | Any common errors preventing controls to run. |Refer [Common Troubleshooting](/guardrails/docs/guides/troubleshooting) for more information.
| Further Assistance | If you encounter further issues, please open a ticket with us and attach the relevant information to assist you more efficiently. | [Open Support Ticket](https://support.turbot.com) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ To resolve policies in an Error state, execute the run-policies script using the

| Issue | Description | Guide |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| Further Assistance | If you encounter further issues with Calculated Policies, please open a ticket with us and attach the relevant information to assist you more efficiently. | [Open Support Ticket](https://support.turbot.com) |
| Further Assistance | If you encounter further issues, please open a ticket with us and attach the relevant information to assist you more efficiently. | [Open Support Ticket](https://support.turbot.com) |
3 changes: 2 additions & 1 deletion docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@
"guides/hosting-guardrails/monitoring/diagnose-control-error",
"guides/hosting-guardrails/monitoring/check-mod-health",
"guides/hosting-guardrails/monitoring/workspace-health-check",
"guides/hosting-guardrails/monitoring/monitoring-alarms"
"guides/hosting-guardrails/monitoring/monitoring-alarms",
"guides/hosting-guardrails/monitoring/investigate-lambda-invocation"
]
},
{
Expand Down

0 comments on commit 3048af5

Please sign in to comment.