Who can elect S
Only US-citizens-or-residents can be S-corp shareholders. A non-US owner cannot hold S-corp stock — if a foreign person holds any S-corp shares, the S election is invalidated.
Why this matters for non-US founders
If you are a non-US founder and someone has recommended an S-corp, the recommendation is wrong for your fact pattern. S is not available while you remain non-resident. Default C-corp (via Form 8832) or disregarded-entity treatment is where this community lives.
See also: Form 8832, disregarded entity.