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개 답변
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
전문가
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인