I don't think it's a necessary requirement that the main function in a zip action is located in the file index.php. If we adopt the aws lambda convention of path/to/file.handler then it's possible to locate the "index" anywhere in the zip and this is an added convenience particularly working with existing php code.