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달 전142회 조회
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
전문가
검토됨 16일 전
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
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠