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 Answer
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
EXPERT
answered a year ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions