- Newest
- Most votes
- Most comments
Theoretically [1], you can do it. Once the zip file is uploaded to an S3 bucket, you can create a new Elastic Beanstalk environment or update an existing one by pointing it to this S3 location.
ℹ️ For more information, you can refer to the section about the contents of the Elastic Beanstalk Amazon S3 bucket in the AWS documentation here.
Similarly, you can move your locally published files to AWS by manually uploading them to S3 and then deploying through Elastic Beanstalk. After packaging your application into a zip file post-local publication, uploading this file to S3 allows you to maintain control over the deployment process and versioning of your application.
[1] ⚠️ I haven't tried it myself, but the process is well-detailed in the AWS documentation on creating an application source bundle.
Just so you know, if you use the AWS Toolkit for Visual Studio (which is an extension), you can publish directly from Visual Studio to Elastic Beanstalk. This does not copy your source code, it actually does a local publish first, then zips the files for you into a .zip file, uploads them to the Elastic Beanstalk service, configures the Elastic Beanstalk environment, and launches it, all automatically. The publishing wizard actually shows you all the commands it is using, so you can see what it's doing.
If your ASP.NET Core application does not have any Windows OS dependencies, I would encourage you to also consider publishing it as a Linux container to Amazon ECS (Elastic Container Service). The toolkit will create the Dockerfile for you automatically (if you haven't already added one using Visual Studio), build the container locally on your computer, and deploy it for you. And the AWS AppRunner service is even easier - you can just give it the location of your source code (in GitHub, or AWS CodeCommit), and it will build the container in the AWS cloud, and deploy for you, without even needing Docker on your own computer.
Relevant content
- Accepted Answerasked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago