Question regarding .net core publishing option on AWS

0

I don’t want to publish my (asp.net core app) all source code on aws, only the locally published / compiled dll files i want to push to aws.

Means, I want to publish my app locally first (.net core 7) and then I want to move the “published-app1” directory to AWS environment.

Will it work if I manually move the “published-app1-zip” zip file to S3, like I publish application from my visual studio console to AWS directly using “AWS Elastic Beanstalk” to S3 server ?

Or can I move the same way, the locally published files to AWS ?

profile picture
質問済み 2ヶ月前143ビュー
2回答
2
承認された回答

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.

profile picture
エキスパート
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 19日前
profile picture
エキスパート
レビュー済み 2ヶ月前
0

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.

profile pictureAWS
Kirk_D
回答済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ