steampipe plugin install aws

Table: aws_codedeploy_deployment_config - Query AWS CodeDeploy Deployment Configurations using SQL

The AWS CodeDeploy Deployment Configurations is a feature of AWS CodeDeploy, a service that automates code deployments to any instance, including Amazon EC2 instances and servers hosted on-premise. Deployment configurations specify deployment rules and success/failure conditions used by AWS CodeDeploy when pushing out new application versions. This enables you to have a consistent, repeatable process for releasing new software, eliminating the complexity of updating applications and systems.

Table Usage Guide

The aws_codedeploy_deployment_config table in Steampipe provides you with information about deployment configurations within AWS CodeDeploy. This table allows you as a DevOps engineer, developer, or system administrator to query deployment configuration details, including deployment configuration names, minimum healthy hosts, and compute platform. You can utilize this table to gather insights on configurations, such as those with specific compute platforms, minimum healthy host requirements, and more. The schema outlines the various attributes of the deployment configuration for you, including the deployment configuration ID, deployment configuration name, and the compute platform.

Examples

Basic info

Explore various configurations of your AWS CodeDeploy deployments to understand their compute platforms, creation times, and regions. This can help you manage and optimize your deployments effectively.

select
arn,
deployment_config_id,
deployment_config_name,
compute_platform,
create_time,
region
from
aws_codedeploy_deployment_config;
select
arn,
deployment_config_id,
deployment_config_name,
compute_platform,
create_time,
region
from
aws_codedeploy_deployment_config;

Get the configuration count for each compute platform

This query helps you understand the distribution of configurations across different compute platforms in your AWS CodeDeploy service. It's useful for gaining insights into how your deployment configurations are spread across different platforms, aiding in resource allocation and strategic planning.

select
count(arn) as configuration_count,
compute_platform
from
aws_codedeploy_deployment_config
group by
compute_platform;
select
count(arn) as configuration_count,
compute_platform
from
aws_codedeploy_deployment_config
group by
compute_platform;

List the user managed deployment configurations

Determine the areas in which user-managed deployment configurations have been set up. This is useful to understand where and when specific computing platforms were established, providing insights into the regional distribution and timeline of your deployment configurations.

select
arn,
deployment_config_id,
deployment_config_name compute_platform,
create_time,
region
from
aws_codedeploy_deployment_config
where
create_time is not null;
select
arn,
deployment_config_id,
deployment_config_name,
compute_platform,
create_time,
region
from
aws_codedeploy_deployment_config
where
create_time is not null;

List the minimum healthy hosts required by each deployment configuration

Discover the segments that require the least number of healthy hosts for each deployment configuration. This can be useful in optimizing resource allocation and ensuring efficient application deployment.

select
arn,
deployment_config_id,
deployment_config_name compute_platform,
minimum_healthy_hosts ->> 'Type' as host_type,
minimum_healthy_hosts ->> 'Value' as host_value,
region
from
aws_codedeploy_deployment_config
where
create_time is not null;
select
arn,
deployment_config_id,
deployment_config_name,
compute_platform,
json_extract(minimum_healthy_hosts, '$.Type') as host_type,
json_extract(minimum_healthy_hosts, '$.Value') as host_value,
region
from
aws_codedeploy_deployment_config
where
create_time is not null;

Get traffic routing details for TimeBasedCanary deployment configurations

Determine the areas in which your AWS CodeDeploy configurations are utilizing TimeBasedCanary deployments. This can be useful for understanding how traffic is managed during deployments, and to assess the percentage and intervals of traffic being directed to your new service versions.

select
arn,
deployment_config_id,
deployment_config_name,
traffic_routing_config -> 'TimeBasedCanary' ->> 'CanaryInterval' as canary_interval,
traffic_routing_config -> 'TimeBasedCanary' ->> 'CanaryPercentage' as canary_percentage
from
aws_codedeploy_deployment_config
where
traffic_routing_config ->> 'Type' = 'TimeBasedCanary';
select
arn,
deployment_config_id,
deployment_config_name,
json_extract(
traffic_routing_config,
'$.TimeBasedCanary.CanaryInterval'
) as canary_interval,
json_extract(
traffic_routing_config,
'$.TimeBasedCanary.CanaryPercentage'
) as canary_percentage
from
aws_codedeploy_deployment_config
where
json_extract(traffic_routing_config, '$.Type') = 'TimeBasedCanary';

Get traffic routing details for TimeBasedLinear deployment configurations

Explore the intricacies of traffic routing for deployments using a 'TimeBasedLinear' configuration. This allows you to understand the rate of change over time, helping to optimize deployment strategies.

select
arn,
deployment_config_id,
deployment_config_name,
traffic_routing_config -> 'TimeBasedLinear' ->> 'LinearInterval' as linear_interval,
traffic_routing_config -> 'TimeBasedLinear' ->> 'LinearPercentage' as linear_percentage
from
aws_codedeploy_deployment_config
where
traffic_routing_config ->> 'Type' = 'TimeBasedLinear';
select
arn,
deployment_config_id,
deployment_config_name,
json_extract(
traffic_routing_config,
'$.TimeBasedLinear.LinearInterval'
) as linear_interval,
json_extract(
traffic_routing_config,
'$.TimeBasedLinear.LinearPercentage'
) as linear_percentage
from
aws_codedeploy_deployment_config
where
json_extract(traffic_routing_config, '$.Type') = 'TimeBasedLinear';

Schema for aws_codedeploy_deployment_config

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.
arntextThe Amazon Resource Name (ARN) specifying the application.
compute_platformjsonbThe destination platform type for the deployment (Lambda, Server, or ECS).
create_timetimestamp with time zoneThe time at which the deployment configuration was created.
deployment_config_idtextThe deployment configuration ID.
deployment_config_nametext=The deployment configuration name.
minimum_healthy_hostsjsonbInformation about the number or percentage of minimum healthy instances.
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.
titletextTitle of the resource.
traffic_routing_configjsonbThe configuration that specifies how the deployment traffic is routed. Used for deployments with a Lambda or Amazon ECS compute platform only.

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_codedeploy_deployment_config