Angular 2 application deployed on Amazon s3 gives 404 error Angular 2 application deployed on Amazon s3 gives 404 error angular angular

Angular 2 application deployed on Amazon s3 gives 404 error


We had the same problem. Just go to Properties > Static website hosting.

In the field Error document, add index.html, like here.


If you are using AWS cli to copy dist folder to your bucket then it copies the project folder to your bucket which contains your files including index.html.

Try uploading contents of dist/< your_project>/ directly to your bucket.It worked for me.

I think S3 is expecting an index.html file at its root level