steampipe plugin install aws

Table: aws_appstream_image - Query AWS AppStream Images using SQL

AWS AppStream Images are 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. These images act as templates for the creation of streaming instances, containing all the necessary applications, drivers, and settings. Administrators can create, maintain, and use these images to provide a consistent user experience, regardless of the device being used.

Table Usage Guide

The aws_appstream_image table in Steampipe provides you with information about images within AWS AppStream. This table allows you as a DevOps engineer to query image-specific details, including the image's name, ARN, state, platform, and associated metadata. You can utilize this table to gather insights on images, such as their visibility, status, and the applications they are associated with. The schema outlines the various attributes of the AppStream Image for you, including the image ARN, creation time, visibility status, and associated tags.

Examples

Basic info

Explore the details of your AWS AppStream images to understand their configuration and attributes. This can be beneficial in managing your resources and ensuring they are optimally configured.

select
name,
arn,
base_image_arn,
description,
created_time,
display_name,
image_builder_name,
tags
from
aws_appstream_image;
select
name,
arn,
base_image_arn,
description,
created_time,
display_name,
image_builder_name,
tags
from
aws_appstream_image;

List available images

Determine the areas in which AWS AppStream images are available for use. This is useful for understanding what resources are currently usable in your environment.

select
name,
arn,
display_name,
platform,
state
from
aws_appstream_image
where
state = 'AVAILABLE';
select
name,
arn,
display_name,
platform,
state
from
aws_appstream_image
where
state = 'AVAILABLE';

List Windows based images

Identify instances where Windows based images are used within the AWS Appstream service. This is beneficial for auditing purposes, ensuring the correct platform is being utilized.

select
name,
created_time,
base_image_arn,
display_name,
image_builder_supported,
image_builder_name
from
aws_appstream_image
where
platform = 'WINDOWS';
select
name,
created_time,
base_image_arn,
display_name,
image_builder_supported,
image_builder_name
from
aws_appstream_image
where
platform = 'WINDOWS';

List images that support image builder

Identify the AWS AppStream images that are compatible with the image builder feature. This is useful to ensure your applications are using images that support this functionality for streamlined image creation and management.

select
name,
created_time,
base_image_arn,
display_name,
image_builder_supported,
image_builder_name
from
aws_appstream_image
where
image_builder_supported;
select
name,
created_time,
base_image_arn,
display_name,
image_builder_supported,
image_builder_name
from
aws_appstream_image
where
image_builder_supported = 1;

List private images

Explore which AppStream images are set to private to manage access and ensure security. This can help identify instances where images may need to be shared or restricted further.

select
name,
created_time,
base_image_arn,
display_name,
image_builder_name,
visibility
from
aws_appstream_image
where
visibility = 'PRIVATE';
select
name,
created_time,
base_image_arn,
display_name,
image_builder_name,
visibility
from
aws_appstream_image
where
visibility = 'PRIVATE';

Get application details of images

Explore the various attributes of applications within images, such as creation time, display name, and platform compatibility. This can be useful to understand the application's configuration and behavior for effective management and troubleshooting.

select
name,
arn,
a ->> 'AppBlockArn' as app_block_arn,
a ->> 'Arn' as app_arn,
a ->> 'CreatedTime' as app_created_time,
a ->> 'Description' as app_description,
a ->> 'DisplayName' as app_display_name,
a ->> 'Enabled' as app_enabled,
a ->> 'IconS3Location' as app_icon_s3_location,
a ->> 'IconURL' as app_icon_url,
a ->> 'InstanceFamilies' as app_instance_families,
a ->> 'LaunchParameters' as app_launch_parameters,
a ->> 'LaunchPath' as app_launch_path,
a ->> 'Name' as app_name,
a ->> 'Platforms' as app_platforms,
a ->> 'WorkingDirectory' as app_WorkingDirectory
from
aws_appstream_image,
jsonb_array_elements(applications) as a;
select
name,
arn,
json_extract(a.value, '$.AppBlockArn') as app_block_arn,
json_extract(a.value, '$.Arn') as app_arn,
json_extract(a.value, '$.CreatedTime') as app_created_time,
json_extract(a.value, '$.Description') as app_description,
json_extract(a.value, '$.DisplayName') as app_display_name,
json_extract(a.value, '$.Enabled') as app_enabled,
json_extract(a.value, '$.IconS3Location') as app_icon_s3_location,
json_extract(a.value, '$.IconURL') as app_icon_url,
json_extract(a.value, '$.InstanceFamilies') as app_instance_families,
json_extract(a.value, '$.LaunchParameters') as app_launch_parameters,
json_extract(a.value, '$.LaunchPath') as app_launch_path,
json_extract(a.value, '$.Name') as app_name
from
aws_appstream_image,
json_each(applications) as a;

Get the permission model of the images

Determine the access permissions of specific images within your AWS AppStream service. This query is useful if you want to understand which images are accessible by your fleet and image builder, providing insights into your resource utilization and access control.

select
name,
arn,
image_permissions ->> 'AllowFleet' as allow_fleet,
image_permissions ->> 'AllowImageBuilder' as allow_image_builder
from
aws_appstream_image;
select
name,
arn,
json_extract(image_permissions, '$.AllowFleet') as allow_fleet,
json_extract(image_permissions, '$.AllowImageBuilder') as allow_image_builder
from
aws_appstream_image;

Get error details of failed images

Discover the segments that contain failed images within your AWS AppStream environment. This query can be used to identify and analyze the issues causing image failures, helping to improve the efficiency and reliability of your AppStream services.

select
name,
arn,
e ->> 'ErrorCode' as error_code,
e ->> 'ErrorMessage' as error_message,
e ->> 'ErrorTimestamp' as error_timestamp
from
aws_appstream_image,
jsonb_array_elements(image_errors) as e;
select
name,
arn,
json_extract(e.value, '$.ErrorCode') as error_code,
json_extract(e.value, '$.ErrorMessage') as error_message,
json_extract(e.value, '$.ErrorTimestamp') as error_timestamp
from
aws_appstream_image,
json_each(image_errors) as e;

Schema for aws_appstream_image

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.
applicationsjsonbThe applications associated with the image.
appstream_agent_versiontextThe version of the AppStream 2.0 agent to use for instances that are launched from this image.
arntext=The Amazon Resource Name (ARN) of the image.
base_image_arntextThe ARN of the image from which this image was created.
created_timetimestamp with time zoneThe time the image was created.
descriptiontextThe description to display.
display_nametextThe image name to display.
image_builder_nametextThe name of the image builder that was used to create the private image. If the image is shared, this value is null.
image_builder_supportedbooleanIndicates whether an image builder can be launched from this image.
image_errorsjsonbDescribes the errors that are returned when a new image can't be created.
image_permissionsjsonbThe permissions to provide to the destination AWS account for the specified image.
nametext=The name of the image.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
platformtextThe operating system platform of the image.
public_base_image_released_datetimestamp with time zoneThe release date of the public base image. For private images, this date is the release date of the base image from which the image was created.
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statetextThe image starts in the PENDING state. If image creation succeeds, the state is AVAILABLE. If image creation fails, the state is FAILED.
state_change_reasonjsonbThe reason why the last state change occurred.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
visibilitytextIndicates whether the image is public or private.

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_image