Check ID: vpc_endpoint_for_ec2_enabled
Provider: AWS
Service: vpc
Severity: MEDIUM
Categories: internet-exposed, trust-boundaries
Resource type: AwsEc2VpcEndpointService

What this check verifies

Amazon VPCs are evaluated for an interface VPC endpoint to the Amazon EC2 API (ec2). Its presence indicates private EC2 API connectivity over AWS PrivateLink within the VPC.

Risk

Without a private EC2 endpoint, EC2 API traffic exits via IGW/NAT. This expands exposure to network path threats (e.g., DNS hijack, MITM) and weakens egress isolation. It also adds an internet egress dependency for API access, reducing availability if NAT/edge paths fail.

Recommendation

Use an interface VPC endpoint for the EC2 service in each VPC that requires EC2 API access.
  • Enable private DNS to keep calls on the AWS network
  • Apply restrictive endpoint policies (least privilege)
  • Reduce reliance on public egress and layer controls for defense in depth

Remediation

aws ec2 create-vpc-endpoint —vpc-id <VPC_ID> —service-name com.amazonaws.<REGION>.ec2 —vpc-endpoint-type Interface —subnet-ids <SUBNET_ID>

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = vpc_endpoint_for_ec2_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks