Skip to content

elastic beanstalk deployment from visual studio

0

I have .net 8 application which i have deployed to a elastic beanstalk, i have used the wizard. Last time i deployed a new application was 2 years ago, but now i have run into problems with my new application.

when i deploy a new version, my latest version in "application versions" get deleted, regardless of the success of deployment of the new version. I have been trouble shooting some problems with nginx config, and find myself with an extra problem. First time i get a version that deploy with errors, it cant rollback be course the old version has been deleted. I have tried to configure Lifecycle settings, but has no effect what so ever. I cant deploy a new version, be course of errors with the previous versions, the beanstalk cant find!

is this a feature in the new awstools for visual studio? anybody know how track the awstools, to see if is deleting the old versions?

1 Answer
-1

When deploying from Visual Studio to Elastic Beanstalk, the AWS Toolkit for Visual Studio handles the packaging and deployment process. The behavior you're experiencing where previous application versions are being deleted is not standard functionality.

When you deploy using the AWS Toolkit for Visual Studio, the process typically:

  1. Exports your application as a web deploy file
  2. Uploads it to Amazon S3
  3. Registers it as a new application version
  4. Deploys it to your environment

Previous versions should remain in the "Application versions" section unless specifically configured to be removed. The Lifecycle settings in Elastic Beanstalk should control this behavior, but you mentioned they're not having an effect.

To troubleshoot this issue:

  1. Check if you're using the "Republish" option in Visual Studio (right-click on the project and select "Republish to Environment"). This option uses the settings from your previous deployment.

  2. Verify your Lifecycle settings in the Elastic Beanstalk console. These settings should control version retention.

  3. Consider using an alternative deployment method temporarily, such as the Elastic Beanstalk console or AWS CLI, to see if the issue persists.

  4. If you need to maintain specific versions for rollback purposes, you might want to manually create application versions through the Elastic Beanstalk console before deploying.

  5. For .NET 8 applications, ensure you're using the latest version of the AWS Toolkit for Visual Studio, as older versions might have compatibility issues with newer .NET frameworks.

The issue could be related to a bug in the AWS Toolkit for Visual Studio or a misconfiguration in your deployment settings. If the problem persists, you might want to consider using GitHub Actions or another CI/CD pipeline for more controlled deployments to Elastic Beanstalk.
Sources
Deploying to your environment - AWS Elastic Beanstalk
Deploying an ASP.NET Core Application to Elastic Beanstalk (Legacy) - AWS Toolkit for Visual Studio
Custom Elastic Beanstalk Application Deployments - AWS Toolkit for Visual Studio

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.