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, regionfrom aws_codedeploy_deployment_config;
select arn, deployment_config_id, deployment_config_name, compute_platform, create_time, regionfrom 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_platformfrom aws_codedeploy_deployment_configgroup by compute_platform;
select count(arn) as configuration_count, compute_platformfrom aws_codedeploy_deployment_configgroup 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, regionfrom aws_codedeploy_deployment_configwhere create_time is not null;
select arn, deployment_config_id, deployment_config_name, compute_platform, create_time, regionfrom aws_codedeploy_deployment_configwhere 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, regionfrom aws_codedeploy_deployment_configwhere 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, regionfrom aws_codedeploy_deployment_configwhere 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_percentagefrom aws_codedeploy_deployment_configwhere 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_percentagefrom aws_codedeploy_deployment_configwhere 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_percentagefrom aws_codedeploy_deployment_configwhere 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_percentagefrom aws_codedeploy_deployment_configwhere json_extract(traffic_routing_config, '$.Type') = 'TimeBasedLinear';
Schema for aws_codedeploy_deployment_config
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) specifying the application. | |
compute_platform | jsonb | The destination platform type for the deployment (Lambda, Server, or ECS). | |
create_time | timestamp with time zone | The time at which the deployment configuration was created. | |
deployment_config_id | text | The deployment configuration ID. | |
deployment_config_name | text | = | The deployment configuration name. |
minimum_healthy_hosts | jsonb | Information about the number or percentage of minimum healthy instances. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
traffic_routing_config | jsonb | The configuration that specifies how the deployment traffic is routed. Used for deployments with a Lambda or Amazon ECS compute platform only. | |
zonal_config | jsonb | Information about a zonal configuration. |
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