when you have resources in a vpc such as ec2 compute it's running; your comms are on ports over tcp pipes; it's networking
when you have resources in a serverless env such as lambda & s3 it's not running; your comms are on events over [mysterious protocol]; it's not networking, it's request response event objects being passed around...
your html file with js functions handling button clicks don't need a network to communicate; the events are part of the file system and the way html operates with js, not a http endpoint or an ssh tunnel...