Closed dbermuehler closed 4 weeks ago
Hey folks, this is an awesome PR! Our team will really benefit from having this tables in Steampipe. Is there an expected deadline to merge it?
@misraved, could you please review this PR when you have a chance and proceed if everything looks good?
Note: Regarding the optional qualifiers (start_time
and end_time
) for the aws_shield_attack
table, we have decided to temporarily remove support for them. Handling the various combinations of start_time
and end_time
with different query operators is a bit complex at the moment.
You can find the related discussion in the community channel.
Your feedback would be greatly appreciated.
Thanks!
Thanks @dbermuehler for the new set of tables đź‘Ť!!
Could you please add query results(without any sensitive information) to the PR body?
Thank you @misraved. I added the queries, including the (anonymized) query results.
This PR adds all relevant Shield APIs as tables to Steampipe. It will add the following new tables:
aws_shield_protection
aws_shield_protection_group
aws_shield_attack
aws_shield_attack_summary
aws_shield_attack_statistic
aws_shield_subscription
aws_shield_drt_access
aws_shield_emergency_contact
Since this is my first time contributing to this project and also the first time I worked with go, I would be more than happy to receive some feedback especially on the following points:
KeyColumns
for theGet
andList
functions correct and can help to speed up the SQL queries?aws_shield_emergency_contact
andaws_shield_attack_statistic
aws_shield_subscription
table work properly if it is used with an AWS account that is not subscribed to Shield Advanced already?Looking forward to your feedback! Cheers!
Integration test logs
Logs
``` Add passing integration test logs here ```Example query results
Results
## `aws_shield_attack` ```sql+postgres select resource_arn, start_time, end_time from aws_shield_attack where start_time between current_date - interval '30 day' and current_date; ``` ``` +--------------------------------------------------------------+---------------------------+---------------------------+ | resource_arn | start_time | end_time | +--------------------------------------------------------------+---------------------------+---------------------------+ | arn:aws:cloudfront::XXXXXXXXXXXXX:distribution/YYYYYYYYYYYYY | 2024-10-22T09:10:00+02:00 | 2024-10-22T09:20:00+02:00 | | arn:aws:cloudfront::XXXXXXXXXXXXX:distribution/YYYYYYYYYYYYY | 2024-10-20T17:09:00+02:00 | 2024-10-20T17:18:00+02:00 | | arn:aws:cloudfront::XXXXXXXXXXXXX:distribution/YYYYYYYYYYYYY | 2024-10-06T10:33:00+02:00 | 2024-10-06T10:39:00+02:00 | +--------------------------------------------------------------+---------------------------+---------------------------+ ``` ## `aws_shield_attack_statistic` ```sql+postgres select max, unit, attack_count from aws_shield_attack_statistic order by attack_count desc; ``` ``` +--------------------+-------------------+--------------+ | max | unit | attack_count | +--------------------+-------------------+--------------+ | 6439917.8166666668 | RequestsPerSecond | 38 | +--------------------+-------------------+--------------+ ``` ## `aws_shield_drt_access` ```sql+postgres select role_arn, log_bucket_list from aws_shield_drt_access; ``` ``` +-------------------------------------------+-----------------+ | role_arn | log_bucket_list | +-------------------------------------------+-----------------+ | arn:aws:iam::XXXXXXXXXXXX:role/DRT-Role |