How to host a full CRUD angular application in AWS

Viewed 217

I am trying to find out what makes an angular site a static website vs dynamic.

I have an angular app with a .net backend. each running separately on IIS server. the angular app talks to the back end to retrieve information using HttpClient (2 IIS servers one for client and one for back end)

basically you launch the app and a number of grids appear which get populated by making http calls to the back end. some components appear based on the contents received from the back end

The contents of the application changes based on the values read from the backend.

for example:

<div *ngIf="value1">
   <component1></component1>
</div>
<div *ngIf="value2">
   <component2></component2>
</div>

both value1 and value2 are read from the backend at init.

Is this considered a static website or dynamic?

I want to move this to AWS Can I use S3 to host this app? with maybe Cloudfront to serve the contents coming from the backend?

or this is an application I better off keeping the same architecture for example running the angular code on an Apache server or something. while the backend remains on IIS?

1 Answers

You can't host this entire app on cloudfront/s3 as a static site (and I wouldn't call your application a static site precisely because you have a .net backend that requires a server to run it on) - but you can certainly host all of the html/js/css/images and other assets on s3/cloudfront, and then use API Gateway or the Application Load Balancer to make api calls to your backend.

This is the most common way I develop applications now - try as much as I can to keep them 100% statically hosted (i.e. with no backend), but when I do need a backend I use either .net windows-service as my backend, or more commonly now, lambda to serve backend needs - or both.

Related