An engineer creates a custom VPC (10.50.0.0/16) and an Internet Gateway (IGW). They immediately try to attach the IGW to a newly created subnet (10.50.1.0/24). Why does the AWS Management Console/CLI throw an error?
An IGW is attached to a VPC, not a subnet. To provide internet access to a subnet, configure its route table with
0.0.0.0/0 pointing to the IGW.