ecorvo
ecorvo

Reputation: 3629

Twilio returns 502 while pointing to AWS API Gateway hooked to Lambda

I have a twilio number pointing to an AWS API Gateway which is hooked to an AWS lambda function which returns XML. After multiple attempts I was finally able to to map the response from Lambda to API gateway and now it is returning valid XML for twilio. If I try to go to the URL or I try to make a curl to the URL I get the expected result: some XML. However, when I try this from twilio I get 502 Bad gateway. Nay ideas why? Also I tried this from multiple IP address so I don't think it is a security issue, since I don't have any security enabled or authentication on the API gateway. I need help...

Upvotes: 3

Views: 933

Answers (1)

ecorvo
ecorvo

Reputation: 3629

I was able to resolve this thanks to the help from this post Twilio - TwiML with SNI Support

Basically it was a SNI problem. Apparently Twilio doesn't yet support SNI.

Upvotes: 1

Related Questions