turbot/aws_compliance

Query: ec2_instance_no_amazon_key_pair

Usage

powerpipe query aws_compliance.query.ec2_instance_no_amazon_key_pair

Steampipe Tables

SQL

select
arn as resource,
case
when instance_state <> 'running' then 'skip'
when key_name is null then 'ok'
else 'alarm'
end as status,
case
when instance_state <> 'running' then title || ' is in ' || instance_state || ' state.'
when key_name is null then title || ' not launched using amazon key pairs.'
else title || ' launched using amazon key pairs.'
end as reason
, region, account_id
from
aws_ec2_instance;

Controls

The query is being used by the following controls: