Setup:
alternate domain added with a valid certificate.
Problem: I am able to make the a login post request with the correct answer. Post that the other requests return 500 - "x-cache": "Error from cloudfront" or 403 - "x-cache": "Error from cloudfront".
Stuck here for 2 days, any help will be appreciated. Thanks
Edit: Invalidated cache > used cloudfront url from swagger to check apis > all works gr8 > used custom url > only login works > use cloud front url again > only login works, requests with auth header don't.
I would suggest you should use application load balancer from AWS and ensure min and max instances to be same as 1. But ideally while deploying any web app, you should use more than single instances from availibility purposes.