Table: aws_appstream_fleet - Query AWS AppStream Fleet using SQL
The AWS AppStream Fleet is a part of Amazon AppStream 2.0, a fully managed, secure application streaming service that allows you to stream desktop applications from AWS to any device running a web browser. It provides users instant-on access to the applications they need, and a responsive, fluid user experience on the device of their choice. An AppStream Fleet consists of streaming instances that run the image builder to stream applications to users.
Table Usage Guide
The aws_appstream_fleet
table in Steampipe provides you with information about fleets within AWS AppStream. This table allows you, as a DevOps engineer, to query fleet-specific details, including the fleet state, instance type, associated stack details, and more. You can utilize this table to gather insights on fleets, such as the fleet's current capacity, the fleet's idle disconnect timeout settings, and the fleet's stream view. The schema outlines the various attributes of the AppStream Fleet for you, including the fleet ARN, creation time, fleet type, and associated tags.
Examples
Basic info
Explore the characteristics of your AWS AppStream fleet, such as its creation time, state, and whether default internet access is enabled. This can help you understand the configuration and status of your fleet for better resource management.
select name, arn, instance_type, description, created_time, display_name, state, directory_name, enable_default_internet_accessfrom aws_appstream_fleet;
select name, arn, instance_type, description, created_time, display_name, state, directory_name, enable_default_internet_accessfrom aws_appstream_fleet;
List fleets that have default internet access anabled
Determine the fleets that have their default internet access enabled. This is beneficial for assessing which fleets are potentially exposed to internet-based threats, thereby assisting in risk management and security planning.
select name, arn, instance_type, description, created_time, display_name, state, enable_default_internet_accessfrom aws_appstream_fleetwhere enable_default_internet_access;
select name, arn, instance_type, description, created_time, display_name, state, enable_default_internet_accessfrom aws_appstream_fleetwhere enable_default_internet_access = 1;
List on-demand fleets
Identify instances where on-demand fleets in AWS AppStream are being used, allowing users to understand the scope and details of their on-demand resource utilization. This information can be valuable for cost management and resource allocation strategies.
select name, created_time, fleet_type, instance_type, display_name, image_arn, image_namefrom aws_appstream_fleetwhere fleet_type = 'ON_DEMAND';
select name, created_time, fleet_type, instance_type, display_name, image_arn, image_namefrom aws_appstream_fleetwhere fleet_type = 'ON_DEMAND';
List fleets that are created in last 30 days
Discover the segments that have been established within the last month to understand their internet access status, maximum concurrent sessions, and user duration limits. This can be beneficial for assessing recent changes or additions to your fleet configurations.
select name, created_time, display_name, enable_default_internet_access, max_concurrent_sessions, max_user_duration_in_secondsfrom aws_appstream_fleetwhere created_time >= now() - interval '30' day;
select name, created_time, display_name, enable_default_internet_access, max_concurrent_sessions, max_user_duration_in_secondsfrom aws_appstream_fleetwhere created_time >= datetime('now', '-30 day');
List fleets that are using private images
Explore which fleets are utilizing private images, allowing you to assess the level of privacy and security in your AWS AppStream fleets. This can be particularly useful in managing resource allocation and ensuring compliance with internal policies regarding data privacy.
select f.name, f.created_time, f.display_name, f.image_arn, i.base_image_arn, i.image_builder_name, i.visibilityfrom aws_appstream_fleet as f, aws_appstream_image as iwhere i.arn = f.image_arn and i.visibility = 'PRIVATE';
select f.name, f.created_time, f.display_name, f.image_arn, i.base_image_arn, i.image_builder_name, i.visibilityfrom aws_appstream_fleet as f, aws_appstream_image as iwhere i.arn = f.image_arn and i.visibility = 'PRIVATE';
Get compute capacity status of each fleet
Assess the elements within each fleet in terms of compute capacity to ensure efficient resource management and optimal performance. This can help in identifying any discrepancies between desired and actual usage, thereby aiding in capacity planning and optimization.
select name, arn, compute_capacity_status ->> 'Available' as available, compute_capacity_status ->> 'Desired' as desired, compute_capacity_status ->> 'InUse' as in_use, compute_capacity_status ->> 'Running' as runningfrom aws_appstream_fleet;
select name, arn, json_extract(compute_capacity_status, '$.Available') as available, json_extract(compute_capacity_status, '$.Desired') as desired, json_extract(compute_capacity_status, '$.InUse') as in_use, json_extract(compute_capacity_status, '$.Running') as runningfrom aws_appstream_fleet;
Get error details of failed images
Identify instances where images have failed within the AWS AppStream fleet by analyzing the associated error codes and messages. This can assist in troubleshooting and rectifying issues promptly.
select name, arn, e ->> 'ErrorCode' as error_code, e ->> 'ErrorMessage' as error_messagefrom aws_appstream_fleet, jsonb_array_elements(fleet_errors) as e;
select name, arn, json_extract(e.value, '$.ErrorCode') as error_code, json_extract(e.value, '$.ErrorMessage') as error_messagefrom aws_appstream_fleet, json_each(fleet_errors) as e;
Get VPC config details of each fleet
Analyze the settings to understand the configuration details of each fleet in your AWS Appstream service. This can help in managing network access and security for your fleets by identifying their associated security groups and subnets.
select name, arn, vpc_config -> 'SecurityGroupIds' as security_group_ids, vpc_config -> 'SubnetIds' as subnet_idsfrom aws_appstream_fleet;
select name, arn, json_extract(vpc_config, '$.SecurityGroupIds') as security_group_ids, json_extract(vpc_config, '$.SubnetIds') as subnet_idsfrom aws_appstream_fleet;
Count fleets by instance type
Identify the variety of fleets based on their instance type within your AWS AppStream service. This can help optimize resource allocation by showing where the most and least populated instance types are.
select name, instance_type, Count(instance_type) as number_of_fleetsfrom aws_appstream_fleetgroup by instance_type, name;
select name, instance_type, Count(instance_type) as number_of_fleetsfrom aws_appstream_fleetgroup by instance_type, name;
List fleets that are in running state
Explore which fleets are currently active and operational. This is useful for monitoring the status of your resources and ensuring they are functioning as expected.
select name, arn, state, created_time, descriptionfrom aws_appstream_fleetwhere state = 'RUNNING';
select name, arn, state, created_time, descriptionfrom aws_appstream_fleetwhere state = 'RUNNING';
Schema for aws_appstream_fleet
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | The Amazon Resource Name (ARN) for the fleet. | |
compute_capacity_status | jsonb | The capacity status for the fleet. | |
created_time | timestamp with time zone | The time the fleet was created. | |
description | text | The description to display. | |
directory_name | text | The fully qualified name of the directory (for example, corp.example.com). | |
disconnect_timeout_in_seconds | bigint | The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to the streaming session after a disconnection or network interruption within this time interval, they are connected to their previous session. Otherwise, they are connected to a new session with a new streaming instance. Specify a value between 60 and 360000. | |
display_name | text | The fleet name to display. | |
enable_default_internet_access | boolean | Indicates whether default internet access is enabled for the fleet. | |
fleet_errors | jsonb | The fleet errors. | |
fleet_type | text | The fleet type. ALWAYS_ON Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, even if no users are streaming apps. ON_DEMAND Provide users with access to applications after they connect, which takes one to two minutes. You are charged for instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. | |
iam_role_arn | text | The ARN of the IAM role that is applied to the fleet. | |
idle_disconnect_timeout_in_seconds | bigint | The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the DisconnectTimeoutInSeconds time interval begins. | |
image_arn | text | The ARN for the public, private, or shared image. | |
image_name | text | The name of the image used to create the fleet. | |
instance_type | text | The instance type to use when launching fleet instances. | |
max_concurrent_sessions | bigint | The maximum number of concurrent sessions for the fleet. | |
max_user_duration_in_seconds | bigint | The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents before being disconnected. | |
name | text | = | The name of the fleet. |
organizational_unit_distinguished_name | text | The distinguished name of the organizational unit for computer accounts. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
platform | text | The platform of the fleet. | |
region | text | The AWS Region in which the resource is located. | |
session_script_s3_location | jsonb | The S3 location of the session scripts configuration zip file. This only applies to Elastic fleets. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The current state for the fleet. | |
stream_view | text | The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When APP is specified, only the windows of applications opened by users display. When DESKTOP is specified, the standard desktop that is provided by the operating system displays. The default value is APP. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
usb_device_filter_strings | jsonb | The USB device filter strings associated with the fleet. | |
vpc_config | jsonb | The VPC configuration for the fleet. |
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_appstream_fleet