0

Trying to deploy the basic 'out of the box' .Net Core 2 Web Api to AWS Beanstalk using the Visual Studio 2017 AWS Toolkit extension, and it fails to deploy.

An example log of an attempted deployment is below, as you can see it is as if it is not packaging it for deployment properly. Have tried using a manifest file but it has made no difference. For the record .Net Core 1.1 deploys just fine.

26/09/2017 01:04:10         terminateEnvironment completed successfully.
26/09/2017 01:04:09         Deleting SNS topic for environment blueostrichdesign-test.
26/09/2017 01:04:07         Deleted EIP: 52.56.251.100
26/09/2017 01:03:52         Deleted security group named: sg-84fbe6ed
26/09/2017 01:03:11         Removed instance 'i-0e10ac9a19db43b5b' from your environment.  (Reason: Instance is in 'terminated' state)
26/09/2017 01:02:05         Waiting for EC2 instances to terminate. This may take a few minutes.
26/09/2017 01:01:49         terminateEnvironment is starting.
26/09/2017 00:59:01         Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
26/09/2017 00:58:02         Environment health has been set to GREEN
26/09/2017 00:57:58         Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
26/09/2017 00:57:58         [Instance: i-0e10ac9a19db43b5b ConfigSet: Infra-EmbeddedPreBuild, Hook-PreAppDeploy, Infra-EmbeddedPostBuild, Hook-EnactAppDeploy, Hook-PostAppDeploy, Hook-PostInit, Infra-WriteVersionOnStartup] Command failed on instance. Return code: 1 Output: null.
26/09/2017 00:57:56         Error occurred during build: Command hooks failed
26/09/2017 00:57:53         Error during deployment: Could not find a part of the path 'C:\\inetpub\\AspNetCoreWebApps\\app\\appsettings.Development.json'.
26/09/2017 00:56:52         Added EC2 instance 'i-0e10ac9a19db43b5b' to Auto Scaling Group 'awseb-e-kezahpkrmy-stack-AWSEBAutoScalingGroup-DJU0DMK4CG3B'.
26/09/2017 00:56:52         Adding instance 'i-0e10ac9a19db43b5b' to your environment.
26/09/2017 00:56:08         Waiting for EC2 instances to launch. This may take a few minutes.
26/09/2017 00:55:19         Created EIP: 52.56.251.100
26/09/2017 00:55:03         Created security group named: sg-84fbe6ed
26/09/2017 00:54:44         Using elasticbeanstalk-eu-west-2-292368120263 as Amazon S3 storage bucket for environment data.
26/09/2017 00:54:43         createEnvironment is starting.

Has anyone else hit this, and if so how have they got round it. Cannot find any other help on the web or things I should be doing.

I have yet to explore the possibility of Docker, but my understanding was this should work out of the box so to speak.

1 Answers1

2

So after much digging and not a lot of help from AWS support I discovered this to be a problem with WebApi thanks to another answer at a different question. And a lot of trial and error lead to a discovery that if you add the wwwroot folder into the project and ensure it is coped to the output or include a placeholder file in it, it should deploy fine!