Publish Project to AWS

From MgmtWiki
Revision as of 21:54, 5 June 2020 by Tom (talk | contribs) (Solution)

Jump to: navigation, search

Full Title or Meme

Build and zip a Visual Studio dot net core 2.1+ Project for publication to Amazon Web Services.




From the website Deploying an ASP.NET core application with Elastic Beanstalk.

  1. Prepare a project with all dependencies marked.
  2. Add a deployment file (see section below)
  3. from Powershell type "dotnet publish" (this and future commands are typed in the project directory)
  4. Create a deployment manifest
  5. Run the Powershell script that creates the zip file of the code to install the soltuion and the zip that up with the deployment manifest.
  6. Copy the deployment bundle to the S3 instance for the app in AWS

Deployment File

 "manifestVersion": 1,
 "deployments": {
   "aspNetCoreWeb": [
       "name": "my-dotnet-core-app",
       "parameters": {
         "archive": ""
-- aws-windows-deployment-manifest.json
PS C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer> dotnet publish
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  SimpleService -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\SimpleService\bin\Debug\netcoreapp3.1\SimpleService.dll
  CredStore -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\CredStore\bin\Debug\netcoreapp3.1\CredStore.dll
  MonitorService -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\MonitorService\bin\Debug\netcoreapp3.1\MonitorService.dll
  RegistryServer -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer\bin\Debug\netcoreapp3.1\RegistryServer.dll
  RegistryServer -> C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer\bin\Debug\netcoreapp3.1\publish\
PS C:\Users\rp_to_000\Documents\TopCat\Repos\TrustRegistry3\RegistryServer>