steampipe plugin install aws

Table: aws_lambda_alias - Query AWS Lambda Alias using SQL

The AWS Lambda Alias is a feature of AWS Lambda service that provides a pointer to a specific Lambda function version. It enables you to manage your function versions and routing configurations, and also allows you to shift incoming traffic between two versions of a function based on preassigned weights. This allows for a gradual code rollout and testing of new function versions in a production environment.

Table Usage Guide

The aws_lambda_alias table in Steampipe provides you with information about alias resources within AWS Lambda. This table allows you, as a DevOps engineer, to query alias-specific details, including the associated function name, function version, and alias ARN. You can utilize this table to gather insights on aliases, such as the alias description, routing configuration, and revision ID. The schema outlines the various attributes of the Lambda alias for you, including the name, ARN, function version, and associated routing configuration.

Examples

Lambda alias basic info

Analyze the settings to understand the basic information of AWS Lambda aliases such as their names, associated function names, and function versions. This can be used to manage and track different versions of your Lambda functions.

select
name,
function_name,
function_version
from
aws_lambda_alias;
select
name,
function_name,
function_version
from
aws_lambda_alias;

Count of lambda alias per Lambda function

Determine the areas in which each AWS Lambda function is being used by counting the number of aliases associated with each function. This can help optimize resource usage and manage function versions effectively.

select
function_name,
count(function_name) count
from
aws_lambda_alias
group by
function_name;
select
function_name,
count(function_name) as count
from
aws_lambda_alias
group by
function_name;

List policy details

Explore the specifics of policies associated with AWS Lambda aliases. This is useful for understanding the permissions and configurations of your Lambda functions.

select
jsonb_pretty(policy) as policy,
jsonb_pretty(policy_std) as policy_std
from
aws_lambda_alias;
select
policy,
policy_std
from
aws_lambda_alias;

List URL configuration details for each alias

This query is useful for examining the URL configurations linked to each alias in your AWS Lambda service. It allows you to understand and manage how your functions are accessed, enhancing your ability to control and optimize your serverless applications.

select
name,
function_name,
jsonb_pretty(url_config) as url_config
from
aws_lambda_alias;
select
name,
function_name,
url_config
from
aws_lambda_alias;

Schema for aws_lambda_alias

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
alias_arntextThe Amazon Resource Name (ARN) of the alias.
descriptiontextA description of the alias.
function_nametext=The name of the function.
function_versiontext=The function version that the alias invokes.
nametext=The name of the alias.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
policyjsonbContains the resource-based policy.
policy_stdjsonbContains the contents of the resource-based policy in a canonical form for easier searching.
regiontext=The AWS Region in which the resource is located.
revision_idtextA unique identifier that changes when you update the alias.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
url_configjsonbThe function URL configuration details of the alias.

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_alias