Found the solution using 7Zip:
- I'm using Windows so I used the File Explorer "Extract All ..." to a temp folder.
- In the folder with the extracted files I selected all files, e.g. <Ctrl-A>
- I right-clicked all files using 7Zip and selected "Add to archive ...".
- Select a destination for the output ZIP file outside of the folder containing all files.
- Make sure that 'Compression level' is set to '5 - Normal' and 'Compression method' is set to 'Deflate'. Leave all other values as default.
- Click OK.
- Import new file into AA Actions.
Unrelated to the original symptom I found out through trial and error that the original ZIP file had all of the Python code and binaries in a sub-folder. The article below confirms my observation that the files need to be in the root of the ZIP file. The other change I made was to update the value in 'Main function' on the ABX edit page to 'main.handler' because the 'handler' function was in the Python script 'main.py' in the root of the ZIP file.
Create a ZIP package for Python runtime extensibility actions
https://docs.vmware.com/en/VMware-Aria-Automation/8.16/Using-Automation-Assembler/GUID-CC6DEEF1-49E8-4881-82A6-FA10DC0135E8.html