aws / aws-toolkit-visual-studio

AWS Toolkit for Visual Studio - a plugin to interact with AWS
https://aws.amazon.com/visualstudio/
Apache License 2.0
110 stars 29 forks source link

Unable to find awsdeploy.exe #99

Open jesusmogollon opened 4 years ago

jesusmogollon commented 4 years ago

After installing the toolkit for visual studio the awsdeploy tool is not in any of the default locations: C:\Program Files (x86)\AWS Tools\Deployment Tool\awsdeploy.exe or C:\Program Files\AWS Tools\Deployment Tool\awsdeploy.exe

Where can I find it?

awschristou commented 4 years ago

Hi @jesusmogollon , awsdeploy.exe is not packaged with the Toolkit for Visual Studio 2017/2019. What are you trying to accomplish?

jesusmogollon commented 4 years ago

I need to publish an AspNet MVC web application to Elastic Beanstalk, however, we need to compile all the razor views into a dll. This option is not available in the configuration screens of the AWS Deployment Wizzard. I figure the best way is to use Visual Studio Publish Wizard to create the WebDeploy zip file (and .pubxml file) and then use awsdeploy.exe to automate the upload to Elastic Beanstalk. Is there a way to pass the .pubxml file to the AWS Wizzard? Or do you recommend another way?

red8888 commented 4 years ago

this is bad, where can we get awsdeploy.exe? I need to automate deployments via CI. Is the answer to buy an old version of visual studio so I can install the extension? thats super shitty

red8888 commented 4 years ago

I can crack open the MSI and poke around, can you confirm this is the right exe?

image

jesusmogollon commented 4 years ago

I'm using that one as well, it is from an old installer, it feels very wrong to do this hack.

NuclearFishin commented 4 years ago

Hi all, I've recently just rebuilt my development workspace with VS 2019 and the AWS Toolkit for Visual Studio, and I can confirm that awsdeploy.exe is installed in the following location:

C:\Program Files (x86)\AWS Tools\Deployment Tool\awsdeploy.exe

However, a subsequent issue I've found is that one key component required to use this tool, namely the "Save configuration" option has been removed from the AWS Toolkit, as-of Version 1.18.0.0, released 2020-06-23:

https://aws-vs-toolkit.s3.amazonaws.com/versioninfo.html

Removed the option to save Beanstalk configurations out to the old awsdeploy tool (awsdeploy.exe). This tool has been succeeded by the dotnet CLI tools package "Amazon.ElasticBeanstalk.Tools".

Note that this option to "save configuration" is still referenced in the official documentation:

https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/deployment-tool.html

Our company's web application is an ASP.NET MVC application running on .NET Framework 4.8. We have a build server that builds deployment packages and we deploy them with awsdeploy.exe. Therefore the "save configuration" component is a necessary part of this. I don't think we're doing anything out of the ordinary here?

Currently, everything is working, but I'm concerned that support may disappear, either deliberately or accidentally through erosion of features like "save configuration". I do have a new environment that I need to spin-up, so I guess I need to copy an existing configuration and manually edit it.

Any advice on what the next steps might be? I can see a few options:

  1. Reinstate the "save configuration" feature
  2. Update the documentation to remove reference to "save configuration", with alternative suggestions
  3. Provide a clear example of how to use Amazon.ElasticBeanstalk.Tools to cover the use-case I've detailed above. I've tried my best to find one, but haven't found anything. Apologies if it does exist an I just missed it.

Thanks very much!

niklr commented 3 years ago

According to the following link the Standalone Deployment Tool options related to AWS CloudFormation deployments and incremental deployments to Elastic Beanstalk are obsolete in the current version and should not be used.

https://github.com/awsdocs/aws-toolkit-visual-studio-user-guide/blob/master/doc_source/deployment-tool.md#tkv-deployment-tool

Do you expect from the developers to use the Visual Studio wizard all the time when they want to publish to Elastic Beanstalk?

Am I missing something or is it currently really not possible to use the command line to do so?

niklr commented 3 years ago

Using the Amazon.ElasticBeanstalk.Tools seems to be the way to go!

https://github.com/aws/aws-extensions-for-dotnet-cli

NuclearFishin commented 3 years ago

Hmm, looking at the docs for Amazon.ElasticBeanstalk.Tools, it suggests this would only work for ASP.NET Core apps? The dotnet eb deploy command is documented as

Deploys the ASP.NET Core application to a Elastic Beanstalk environment

So for traditional .NET Framework web applications, there is no option for standalone deployment? As @niklr pointed out, the standalone tool is marked as obsolete, and refers to the Deploying to Elastic Beanstalk page, which only details how to deploy using the wizard. Surely most commercial websites are deployed from a CI service, and the wizard is out of the question.

I'm very concerned that my .NET Framework web application will suddenly lose the ability to deploy. I'm genuinely not sure what I'm supposed to do, and would appreciate any help!

NuclearFishin commented 3 years ago

Just to follow-up on my previous comment, I've spent the past few hours looking into this and it seems there is another command-line tool, namely the EB CLI

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html

...which is able to perform deployments via the eb deploy command. Using this I was able to deploy a .zip package, so I would say it's a sufficient replacement for awsdeploy.exe for now.

It's not quite the "one-liner" that awsdeploy.exe is, since you need to init a directory and modify the config.yml file (source), but at least this way is not deprecated (although several versions appear to have been retired over the years).

antgel commented 3 years ago

@NuclearFishin I'm in the same boat as you, trying to work out how to deploy .NET Framework to Elastic Beanstalk without having to use the GUI wizard. Are you saying that eb deploy works for .NET Framework even though it's not documented? Can you provide more information, such as the exact command you use, and how you create the .zip?

NuclearFishin commented 3 years ago

Hi @antgel, eb deploy definitely works as-described. I wouldn't say it's undocumented, it's an alternative that evolved separately from awsdeploy.exe, and appears to be the recommended way going forward. Happy to share my setup:

For a .NET Framework web app, the deploy artifact is a Web Deploy Package in the form of a .zip file. Your build server would produce this. A sample command might look like this:

> MSBuild “YourWebProject.csproj” /T:Package

In order to deploy, you first need to invoke eb init and follow the prompts to generate a config.yml for your target environment.

Once generated, you need to edit the file and specify the deploy artifact, eg:

deploy:
  artifact: YourWebDeployPackage.zip

Details on this step are available here.

Finally, to deploy, copy the WebDeployPackage.zip into the same folder as config.yml and invoke the deploy:

> eb deploy

Hope that helps! You will find all this stuff in the docs if you dig deep enough :) Good luck!

onetsmr commented 3 years ago

I was looking for an awsdeploy.exe installer again... AWS Toolkit for Visual Studio HAS NOT awsdeploy.exe The documentation https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/deploy_NET_standalone_tool.html is lying

But it's good that I stayed link http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi

This installer has awsdeploy.exe. Download it and store it like the apple of your eye.