Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pwmcclurg

macrumors newbie
Original poster
May 26, 2024
2
0
I had been using the Archive Utility from Big Sur to zip up python code to send to AWS's Elastic Beanstalk. I had just upgraded to SONOMA and the AWS uploader complained that the zip file was not valid. It never crossed my mind that Apple could miss something so fundamental so I spent a couple days thinking my code was wrong until I went back to working version, used SONOMA's Archive Utility and got the same error message. Using the zip command in linux it all went through perfectly.

Hopefully apple could take a look into this and fix in an upcoming upgrade.
 
The archive utility on macOS adds some extra metadata to the zip file and creates a top-level directory when extracted. Normally this isn't a problem, but Elastic Beanstalk expects the source files to be at the root level of the zip file, without any parent or top-level directory.

There's really nothing wrong with what macOS does; it's more that Elastic Beanstalk expects things to be arranged in a very specific way and complains if it's not done exactly like that. 🤷‍♂️

You can just open up Terminal, navigate to the folder with the files you want to zip and type
zip -r archive.zip . -x '*.DS_Store'

And that will produce a ZIP file that Elastic Beanstalk won't complain about.
 
  • Like
Reactions: chabig and addamas
Thanks jb310 - yes I definitely ran the command you mention. Thanks for the additional details about the directory structure - good to know!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.