steampipe plugin install aws

Table: aws_lambda_function_metric_invocations_daily - Query AWS Lambda Function Metrics using SQL

The AWS Lambda Function Metrics service allows you to monitor and troubleshoot your Lambda functions. It provides real-time metrics with granularity down to one minute and trace data sampling. By querying these metrics using SQL, you can gain insights into function execution such as memory usage, execution time, and failure rates.

Table Usage Guide

The aws_lambda_function_metric_invocations_daily table in Steampipe provides you with information about the daily invocation metrics of AWS Lambda functions. This table enables you, as a DevOps engineer, to query function-specific details, including the number of invocations, the function name, and the timestamp of the data point. You can utilize this table to gather insights on function usage, such as the number of invocations over time, peak usage times, and more. The schema outlines the various attributes of the Lambda function metrics for you, including the function name, the namespace, the metric name, and the timestamp.

The aws_lambda_function_metric_invocations_daily table provides you with metric statistics at 24 hour intervals for the last year.

Examples

Basic info

Gain insights into the daily usage patterns of your AWS Lambda functions. This query helps to understand the frequency and timing of function invocations, which can aid in optimizing resource allocation and cost management.

select
name,
timestamp,
sum
from
aws_lambda_function_metric_invocations_daily
order by
name,
timestamp;
select
name,
timestamp,
sum
from
aws_lambda_function_metric_invocations_daily
order by
name,
timestamp;

Lambda function daily invocations over 10 in last 3 days

Determine the areas in which AWS Lambda functions are being invoked more than 10 times daily over the past three days. This is useful for tracking function usage and identifying potential areas of optimization or troubleshooting.

select
name,
timestamp,
round(sum :: numeric, 2) as sum_invocations,
sample_count
from
aws_lambda_function_metric_invocations_daily
where
date_part('day', now() - timestamp) <= 3
and sum > 10
order by
name,
timestamp;
select
name,
timestamp,
round(sum, 2) as sum_invocations,
sample_count
from
aws_lambda_function_metric_invocations_daily
where
julianday('now') - julianday(timestamp) <= 3
and sum > 10
order by
name,
timestamp;

Schema for aws_lambda_function_metric_invocations_daily

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe AWS Account ID in which the resource is located.
averagedouble precisionThe average of the metric values that correspond to the data point.
maximumdouble precisionThe maximum metric value for the data point.
metric_nametextThe name of the metric.
minimumdouble precisionThe minimum metric value for the data point.
nametextThe name of the function.
namespacetextThe metric namespace.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
sample_countdouble precisionThe number of metric values that contributed to the aggregate value of this data point.
sumdouble precisionThe sum of the metric values for the data point.
timestamptimestamp with time zoneThe time stamp used for the data point.
unittextThe standard unit for the data point.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_lambda_function_metric_invocations_daily