Control: VPCs should be configured with an interface endpoint for Systems Manager
Description
This control checks whether a virtual private cloud (VPC) that you manage has an interface VPC endpoint for AWS Systems Manager. The control fails if the VPC doesn't have an interface VPC endpoint for Systems Manager. This control evaluates resources in a single account.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.vpc_configured_to_use_interface_endpoint_for_ssm
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.vpc_configured_to_use_interface_endpoint_for_ssm --share
SQL
This control uses a named query:
with vpc_endpoints as ( select distinct vpc_id from aws_vpc_endpoint where service_name like 'com.amazonaws.' || region || '.ssm')select v.arn as resource, case when e.vpc_id is null then 'alarm' else 'ok' end as status, case when e.vpc_id is null then v.title || ' not configured to use interface endpoint for SSM.' else v.title || ' configured to use interface endpoint for SSM.' end as reason , region, account_idfrom aws_vpc v left join vpc_endpoints e using (vpc_id);