steampipe plugin install aws

Table: aws_ec2_launch_template - Query AWS EC2 Launch Templates using SQL

The AWS EC2 Launch Template is a resource within the Amazon Elastic Compute Cloud (EC2) service. It allows you to save launch parameters within Amazon EC2 so you can quickly launch instances with those settings. This ensures consistency across instances and reduces the manual effort required to configure individual instances.

Table Usage Guide

The aws_ec2_launch_template table in Steampipe provides you with information about EC2 Launch Templates within AWS Elastic Compute Cloud (EC2). This table allows you, as a DevOps engineer, to query template-specific details, including instance type, key pair, security groups, and user data. You can utilize this table to gather insights on templates, such as associated AMIs, security configurations, instance configurations, and more. The schema outlines the various attributes of the EC2 Launch Template for you, including the template ID, creation date, default version, and associated tags.

Examples

Basic info

Explore which AWS EC2 launch templates have been created, by whom, and when. This can help in understanding the evolution of your infrastructure, including the original and most recent versions of each template.

select
launch_template_name,
launch_template_id,
created_time,
created_by,
default_version_number,
latest_version_number
from
aws_ec2_launch_template;
select
launch_template_name,
launch_template_id,
created_time,
created_by,
default_version_number,
latest_version_number
from
aws_ec2_launch_template;

List launch templates created by a user

Discover the segments that include launch templates created by a specific user in AWS EC2. This is beneficial for understanding and managing user-specific resources within the cloud infrastructure.

select
launch_template_name,
launch_template_id,
create_time,
created_by
from
aws_ec2_launch_template
where
created_by like '%turbot';
select
launch_template_name,
launch_template_id,
create_time,
created_by
from
aws_ec2_launch_template
where
created_by like '%turbot';

List launch templates created in the last 30 days

Identify recently created launch templates within the past month. This is useful for monitoring new additions and ensuring proper configuration and usage.

select
launch_template_name,
launch_template_id,
create_time
from
aws_ec2_launch_template
where
create_time >= now() - interval '30' day;
select
launch_template_name,
launch_template_id,
create_time
from
aws_ec2_launch_template
where
create_time >= datetime('now', '-30 days');

Schema for aws_ec2_launch_template

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.
create_timetimestamp with time zoneThe time launch template was created.
created_bytextThe principal that created the launch template.
default_version_numberbigintThe version number of the default version of the launch template.
latest_version_numberbigintThe name of the Application-Layer Protocol Negotiation (ALPN) policy.
launch_template_idtext=The ID of the launch template.
launch_template_nametext=The name of the launch template.
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.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tags_srcjsonbThe tags for the launch template.
titletextTitle of the resource.

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_ec2_launch_template