Elastic Beanstalk has error with .NET Core files zipped on mac

0

I am having issues with Elastic Beanstalk and my .NET Core web service that I'm attempting to build and deploy from my mac.

I downloaded the dotnet-core-tutorial-bundle.zip from this page: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/dotnet-core-tutorial.html and confirmed that I can upload and deploy this zip.

When I unzip that folder using Finder and rezip using Finder or the zip command line tool, the deployment fails with message "Error during deployment: Application test-dotnet-core is missing web.config file."

I downloaded the same zip on a Windows computer, unzipped using Explorer, and rezipped using Explorer and the deployment succeeds.

Does anyone know a way to zip on a mac that will make Elastic Beanstalk happy? I did find several tutorials and forum posts that indicated that the commands I am running to zip have worked in the past.

My zip script:

zip -r -X site.zip site/
zip my-service.zip site.zip aws-windows-deployment-manifest.json

Edited by: christis on Apr 9, 2019 4:16 AM

asked 4 years ago43 views
1 Answer
0

Mac's zip function was adding an extra site folder to my archive. This isn't the most beautiful script but it works.

dotnet publish -o site -c Release
cd site
zip -r -X ../site.zip .
cd ..
zip my-service.zip site.zip aws-windows-deployment-manifest.json

Edited by: christis on Apr 9, 2019 5:02 PM

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions