Control: EC2 instances should be in a VPC
Description
Deploy AWS Elastic Compute Cloud (AWS EC2) instances within an AWS Virtual Private Cloud (AWS VPC) to enable secure communication between an instance and other services within the amazon VPC, without requiring an internet gateway, NAT device, or VPN connection.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ec2_instance_in_vpc
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ec2_instance_in_vpc --share
SQL
This control uses a named query:
select arn as resource, case when vpc_id is null then 'alarm' else 'ok' end as status, case when vpc_id is null then title || ' not in VPC.' else title || ' in VPC.' end as reason , region, account_idfrom aws_ec2_instance;