Configuring "Deploy to Elastic Beanstalk" plugin in Visual Studio

0

I am playing with new "Deploy to Elastic Beanstalk" in Visual Studio. I was successful in deploying my ASP.Net 7 application to Linux. So, I got through basics. But now I have a number of questions

  • Is it possible to save the deployment the way I can save "Folder" deployment? It saves it somewhere - when deployment page opens, it offers me to use the deployment that already exists. But I run it on a non-default profile; so first I need to manually switch profile. And second - I would prefer to run it from command line as in dotnet publish.
  • How do I install HTTPS? I have a single instance; it looks like I can't use ACM. Which is fine - I am typically use certbot anyway. But I can't figure out how to enable epel / install certbot and run it.
  • Typically, I build a custom API and deploy to it. Is it possible?
  • I would like to have an Angular application running on the same box as well. Is it possible?

These are just a few. The bigger question is, is it possible to look and tweak what is going under the hood? I tried to run dotnet aws deployment-project generate, but I got an error The project you are trying to deploy is currently not supported. I guess I would love to have some kind of tutorial that goes beyond the basics

profile picture
virshu
gefragt vor einem Jahr245 Aufrufe
1 Antwort
1

Hi Virshu,

To address the below questions:

Is it possible to save the deployment the way I can save "Folder" deployment? It saves it somewhere - when deployment page opens, it offers me to use the deployment that already exists. But I run it on a non-default profile; so first I need to manually switch profile. And second - I would prefer to run it from command line as in dotnet publish.

You can save the current running deployment from Elastic Beanstalk. Go to Applications->Choose the application-> Application versions->Under the source tab you can select the source and it will download as a .zip
https://github.com/aws/aws-toolkit-visual-studio/issues/247 

How do I install HTTPS? I have a single instance; it looks like I can't use ACM. Which is fine - I am typically use certbot anyway. But I can't figure out how to enable epel / install certbot and run it.

To install certbot on an Amazon Linux 2 instance, please create an .ebextensions folder in the root of your project and create a file called "00_install_certbot.config" in it [1][2][3]

container_commands:
    10_install_and_enable_epel_release:
        command: "sudo amazon-linux-extras install epel -y"
        ignoreErrors: true
        test: test ! -d "/etc/letsencrypt/"
    30_install_certbot:
        command: "sudo yum install -y certbot python2-certbot-apache"
        ignoreErrors: true
        test: test ! -d "/etc/letsencrypt/"

Typically, I build a custom API and deploy to it. Is it possible?

Yes, it is possible to deploy a custom API. 

I would like to have an Angular application running on the same box as well. Is it possible?

The platform is a single tenant, therefore only 1 application is supported.

Tutorial that goes beyond the basics: Deployment Projects with the new AWS .NET Deployment Experience https://aws.amazon.com/blogs/developer/dotnet-deployment-projects/

References:

[1] https://certbot.eff.org/instructions [2] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html [3] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html [4] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-versions.html [5] https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_Deployment.html [6] https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/welcome.html [7] https://github.com/aws/aws-toolkit-visual-studio/issues

AWS
beantwortet vor einem Jahr
  • Thank you very much! Very helpful A few comments -

    • I am familiar with .ebextensions; but somehow having trouble here. For some reasons commands are not executing. I remember that it had to have more sophisticated structure. I will research further.
    • I made a typo that totally changed the question. I was asking about custom AMIs - can I choose AMI ID during deployment?
    • Tutorial. I saw that page; in fact, one of my questions is specifically about this: I tried to run dotnet aws deployment-project generate but I got an error The project you are trying to deploy is currently not supported

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen