Using custom REST endpoint URLs for API Gateway

0

The pet example for API Management API states http://petstore.execute-api.us-west-2.amazonaws.com/petstore/pets as the url.

  1. Can I have my own domain's URL not hosted on AWS at say, my-animals.com/pets.py ?
  2. My response is a **text **outputting JSON but not sending a Content-Type: application/json header since this was created before application/json got officially registered. Is this going to be an issue ?
已提问 1 年前303 查看次数
1 回答
0

Hi,

On 2., see https://www.freecodecamp.org/news/what-is-the-correct-content-type-for-json-request-header-mime-type-explained/

Without explicitly declaring the content type of a resource, the client may 
attempt to automatically detect the type, but the result may not be accurate. 
This is why it's important to explicitly declare it.

On 2., you can manage the domain name by another DNS provider to have the one that you exactly want as long as you do proper remapping via CNAMES

See https://support.dnsimple.com/articles/differences-between-a-cname-alias-url/ and https://ie.godaddy.com/help/edit-a-cname-record-19237 (for Godaddy but similar for other DNS providers)

profile pictureAWS
专家
已回答 1 年前
  • Regarding using managing a domain name elsewhere - the codebase to spit out the REST API also resides elsewhere, and not on AWS EC2 or Lambda. Is it possible to have the code be as is (say on DigitalOcean etc) and use only AWS Management API to handle the API management? Migrating code from elswhere to AWS is another task for a future date.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则