- Newest
- Most votes
- Most comments
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:
- Exports your application as a web deploy file
- Uploads it to Amazon S3
- Registers it as a new application version
- 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:
-
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.
-
Verify your Lifecycle settings in the Elastic Beanstalk console. These settings should control version retention.
-
Consider using an alternative deployment method temporarily, such as the Elastic Beanstalk console or AWS CLI, to see if the issue persists.
-
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.
-
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
Relevant content
asked 3 years ago
