At SFO you must reclear security and the easiest way is to take a quick 5-10 minute walk between the Terminal 1 and Terminal 3 (Terminal 2 is currently closed but you can walk through it).
As nako said, the LAX is easy to do airside, though wait times can get long depending on time of day. I think the 20 minute mark is a good estimate though. If you do want to reclear security you can of course, and the walk is about 10 minutes from AA to AS.