Naishav Mehta
Naishav Mehta

Reputation: 316

Deploying Angular App on AWS for Production

I have an AngularJS app which we need to deploy on production. It also has REST API calls.

As of now for development, we deployed it on AWS EC2 Ubuntu Instance and using grunt serve to run it.

I know grunt should be used only for development, so what are the other ways to deploy Angular App on AWS? I see many answers for deploying it on S3/Cloudfront. Can't we use EC2 instance with Nginx/Tomcat for this purpose on production?

Thanks!

Upvotes: 2

Views: 1200

Answers (1)

Ashan
Ashan

Reputation: 19705

You can setup CloudFront infront of EC2 instance to cache static contents in Angular App, which will improve the application performance better at scale.

If you can clearly seperate the Angular App including the index.html, it is an option to host it in AWS S3 also using CloudFront as a cache and a proxy to your EC2 instance which will reduce the overhead completely on delivering static content from the EC2 instance, further improving the performance. Also you can use S3 to store file uploads.

Upvotes: 1

Related Questions