AWS Elastic Beanstalk: invalid YAML or JSON error when uploading zip file from MAC OS

If you’re doing the Amazon AWS workshop LAB:

ie. Upload and Deploying your Elastic Beanstalk app

and getting this **PROBLEM** error:

*ERROR Failed to deploy application.

*ERROR The configuration file __MACOSX/.ebextensions/._setup.config in application version 1.1.0 contains invalid YAML or JSON. YAML exception: Invalid Yaml: unacceptable character ‘&#0;’ (0x0) special characters are not allowed in “<reader>”, position 0, JSON exception: Invalid JSON: Unexpected character (&#0;) at position 0.. Update the configuration file.

*INFO Environment update is starting.


This is because MACOS includes some extra hidden folders which you need to exclude from your ZIP file. To do this, run this command in terminal on your zip:

$ zip -d __MACOSX/\*

Now re-upload, and you should get a success message:

INFO Environment update completed successfully.
INFO New application version was deployed to running EC2 instances.

Hope this solved your issue!

About Steven Chu

Hi, I'm Steven! I'm an entrepreneur, photographer and art director in New York. Follow this blog for self expression, fun, and most importantly: looking comfortable, at ease, and amazing in your photos no matter who takes them! I dedicate this to my amazing friends who have let me inadvertently turn all of our hangouts and travel photos into a never ending photoshoot of fun. The proof is in the pudding-- our photos rock. My other projects: I'm the founder of, a face-to-face tech concierge service for NYC. Book a techie to walk you through something you want to learn! My work focuses on socially engaged art projects which use technology to create access to resources for communities. Visit Steven Chu Studio ( for branding & design work or Steven Chu ( for photography projects.

Leave a Reply