Reputation: 5785
Need some help :) I have created a simple AWS API Gateway with a lambda backend just for trying it out. The only response is { "date": "2017-01-01" }
, and the only method accepted is GET
. When I test the API in the AWS Console it works fine. The response is as expected. But when I try to access it externally I get an Internal error message
response. It kind of blows of course. Do I have to setup a elastic IP for this to work? I shouldn't have to add any roles to the API Gateway (I assume) since the role only declares what resources the API Gateway should be allowed to access? Or is there a "external access" role of some kind? Ot do I have to provide any HTTP-header when accessing the API?
Upvotes: 0
Views: 188
Reputation: 8541
Please enable CORS if you accesing API from an external domain. Please see the screenshot below, which shows how to enable CORS
Upvotes: 1