Q: SPA post requests in cloudfront I have created a cloudfront distribution with two origins (s3 bucket and aws apigateway). The s3 bucket serves my Elm spa successfully but when I try to send a post request via the SPA to my api gateway I get a 403. This is my elm post request:
testReq : Cmd Msg
testReq =
  request
    { method = "POST"
    , headers = []
    , url = "https://xxxxxxxxxx.cloudfront.net/api/testy/gettalent"
    , body = jsonBody testBody
    , expect = Http.expectWhatever Resp
    , timeout = Nothing
    , tracker = Nothing
    }


A: Usually, HTTP 403 means access denied, In your case, I believe that your website domain and the API domains are different. Therefore this could be access denied due to "Cross-Origin Request Blocked" error. 
if that's the case, you should enable CORS on your API resource method. 
Reference:
https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html
