Skip to content

Conversation

@pdecat
Copy link
Contributor

@pdecat pdecat commented Dec 9, 2025

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
steampipe query "select * from aws_ec2_fleet where fleet_id = 'fleet-839f1697-91a4-eca5-ac90-090060fb0954'"
+--------------------------------------------+-------------------------------------------------------------------------------------+-------------+-----------------+---------------------------+---------+--------------------------------------+---------+------------------------------------+--------------------+------------------------------+-----------------------------+-------------------------------------+---------------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+--------------------------------------------+--------+-----------------------------------------------------------------------------------------+-----------+-----------+--------------+--------------------+----------------------------------------------------------------+----------------------------------------------------------------+
| fleet_id                                   | arn                                                                                 | fleet_state | activity_status | create_time               | type    | client_token                         | context | excess_capacity_termination_policy | fulfilled_capacity | fulfilled_on_demand_capacity | replace_unhealthy_instances | terminate_instances_with_expiration | valid_from                | valid_until               | target_capacity_specification                                                                                                                   | spot_options | on_demand_options | launch_template_configs                                                                                                                                                                                                                                                                                                                                                           | instances                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | errors | tags_src | title                                      | tags   | akas                                                                                    | partition | region    | account_id   | sp_connection_name | sp_ctx                                                         | _ctx                                                           |
+--------------------------------------------+-------------------------------------------------------------------------------------+-------------+-----------------+---------------------------+---------+--------------------------------------+---------+------------------------------------+--------------------+------------------------------+-----------------------------+-------------------------------------+---------------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+--------------------------------------------+--------+-----------------------------------------------------------------------------------------+-----------+-----------+--------------+--------------------+----------------------------------------------------------------+----------------------------------------------------------------+
| fleet-839f1697-91a4-eca5-ac90-090060fb0954 | arn:aws:ec2:eu-west-3:012345678901:fleet/fleet-839f1697-91a4-eca5-ac90-090060fb0954 | active      | fulfilled       | 2025-12-09T14:27:02+01:00 | instant | 5043753f-c865-414a-8798-8fcc7594db7b | <null>  |                                    | 1                  | 1                            | false                       | false                               | 1970-01-01T01:00:00+01:00 | 1970-01-01T01:00:00+01:00 | {"DefaultTargetCapacityType":"on-demand","OnDemandTargetCapacity":1,"SpotTargetCapacity":0,"TargetCapacityUnitType":"","TotalTargetCapacity":1} | <null>       | <null>            | [{"LaunchTemplateSpecification":{"LaunchTemplateId":null,"LaunchTemplateName":"test-fleet-template","Version":"$Latest"},"Overrides":[{"AvailabilityZone":null,"BlockDeviceMappings":null,"ImageId":null,"InstanceRequirements":null,"InstanceType":"t3.micro","MaxPrice":null,"Placement":null,"Priority":null,"SubnetId":"subnet-026510378e8e5dc6c","WeightedCapacity":null}]}] | [{"InstanceIds":["i-079ebd2461e9cdc1c"],"InstanceType":"t3.micro","LaunchTemplateAndOverrides":{"LaunchTemplateSpecification":{"LaunchTemplateId":"lt-03bc9fb3435dca4eb","LaunchTemplateName":null,"Version":"1"},"Overrides":{"AvailabilityZone":null,"BlockDeviceMappings":null,"ImageId":null,"InstanceRequirements":null,"InstanceType":"t3.micro","MaxPrice":null,"Placement":null,"Priority":null,"SubnetId":"subnet-026510378e8e5dc6c","WeightedCapacity":null}},"Lifecycle":"on-demand","Platform":""}] | []     | <null>   | fleet-839f1697-91a4-eca5-ac90-090060fb0954 | <null> | ["arn:aws:ec2:eu-west-3:012345678901:fleet/fleet-839f1697-91a4-eca5-ac90-090060fb0954"] | aws       | eu-west-3 | 012345678901 | aws                | {"connection_name":"aws","steampipe":{"sdk_version":"5.13.1"}} | {"connection_name":"aws","steampipe":{"sdk_version":"5.13.1"}} |
+--------------------------------------------+-------------------------------------------------------------------------------------+-------------+-----------------+---------------------------+---------+--------------------------------------+---------+------------------------------------+--------------------+------------------------------+-----------------------------+-------------------------------------+---------------------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+--------------+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+----------+--------------------------------------------+--------+-----------------------------------------------------------------------------------------+-----------+-----------+--------------+--------------------+----------------------------------------------------------------+----------------------------------------------------------------+

@misraved misraved requested review from Copilot and misraved December 9, 2025 13:42
@misraved misraved added the community-contribution Pull requests for plugins contributed by the community label Dec 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for querying AWS EC2 Fleets through a new aws_ec2_fleet table in Steampipe. EC2 Fleet is an AWS service that allows launching and managing multiple EC2 instances across different instance types and Availability Zones with various purchasing options (On-Demand, Reserved, Spot). The implementation provides comprehensive access to fleet configurations, capacity specifications, and instance details through SQL queries.

Key changes:

  • Adds a new aws_ec2_fleet table with full support for querying fleet configurations and capacity details
  • Implements filtering capabilities for fleet state, activity status, type, and other fleet properties
  • Includes comprehensive documentation with SQL query examples for common use cases

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
aws/table_aws_ec2_fleet.go Core implementation of the EC2 Fleet table including list/get operations, ARN hydration, tag transforms, and filter building
aws/plugin.go Registers the new aws_ec2_fleet table in the plugin's table map
docs/tables/aws_ec2_fleet.md Documentation with table description, usage guide, and 9 SQL query examples covering basic info, capacity analysis, spot options, and error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pdecat
Copy link
Contributor Author

pdecat commented Dec 9, 2025

Note: those UNIX epoch values in the example I provided are returned by the AWS API:

# aws ec2 describe-fleets --fleet-ids fleet-811dbc9f-318e-ee0f-86b2-83800ef19404 |& grep Valid
            "ValidFrom": "1970-01-01T00:00:00+00:00",
            "ValidUntil": "1970-01-01T00:00:00+00:00",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Pull requests for plugins contributed by the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants