How To Publish An ASP.NET Web App To AWS Using Visual Studio

Alex Norris
Strategio
Published in
3 min readFeb 14, 2022

Congratulations! You made your first ASP.NET web app and you are ready to share it with the world. While there are native Visual Studio tools built-in for deployment to Azure, you decided to publish to AWS instead. No sweat! Here are the steps to finish the job!

Prerequisites:

  • Visual Studio 2017 or newer: For this tutorial, I will be using Visual Studio, but the steps remain the same.
  • AWS Account: Free tier should be all you need.
  • Existing ASP.NET Project: If you are just here to learn, you can just use the default ASP.NET templates in Visual Studio.

Installing the AWS Toolkit

  1. Select Extensions then click on Manage Extensions.
  2. Search for AWS in the top-right search bar of the new window and download the AWS Toolkit for Visual Studio 2017 and 2019.

3. To complete the installation: close all windows of Visual Studio and follow the Installer.

Publishing to AWS Elastic Beanstalk

Now that you’ve installed the toolkit, you are ready to publish through Visual Studio!

  1. Right-click your ASP.NET project in the Solution Explorer.
  2. Click Publish to AWS Elastic Beanstalk in the pop-up menu.

3. From here, select the proper credentials, region and make sure that Create a new application environment is selected before clicking Next.

4. Choose names for your application, environment, and URL. In this step, I used the default names and the dev option for my environment.

5. This toolkit is super useful in that it automatically populates the options needed for your web app. Feel free to take a look and change settings as you see fit. For this tutorial: I will stick with the defaults and move on to the review page.

6. Now that your settings are all in place, review them and then hit deploy!

Note: This will automatically create an Elastic Beanstalk App, S3 storage Bucket, and EC2 instances and you can review these in the AWS Management Console.

7. Review the deployment in the resulting status window!

Conclusion

Congratulations, again! You have now successfully deployed your ASP.NET project to AWS using Visual Studio! Now get out there and share your project with the world!

Consider following me and leaving a comment below with any questions and concerns.

--

--