Now that our application has been created, let's deploy it to a remote server. Instead of maintaining a web server, such as Apache or Nginx in an EC2 instance, let's keep it serverless and use an S3 bucket with the S3 website-hosting feature enabled.
S3 static website hosting
Setting up an S3 bucket
To get started, create an S3 bucket either from the AWS console or with the following AWS CLI command:
aws s3 mb s3://serverlessmovies.com
Next, build the web application for production mode:
ng build --prod
The --prod flag will generate an optimized version of the code and do additional build steps, such as JavaScript and CSS minification, dead code elimination, and bundling:
This will give you the dist/ directory with...