turbot/aws_compliance

Query: ec2_instance_publicly_accessible_iam_profile_attached

Usage

powerpipe query aws_compliance.query.ec2_instance_publicly_accessible_iam_profile_attached

Steampipe Tables

SQL

select
arn as resource,
case
when iam_instance_profile_id is not null then 'ok'
else 'alarm'
end as status,
case
when iam_instance_profile_id is not null then title || ' IAM profile attached.'
else title || ' IAM profile not attached.'
end as reason
, region, account_id
from
aws_ec2_instance
where
public_ip_address is not null;

Controls

The query is being used by the following controls: