0

Was wondering about the integration between S3 and Api-Gateway. S3 is one of the integration you can set up on an HTTP endpoint.

I have a REST API, i'm trying to route traffic from to a specific bucket.

The idea is to serve multiple static sites from a single bucket.

The tree is simple: S3://{ bucket_name }/{ hostname }/{ index.html }. and when clients GET { project1.mydomain.com } the Gateway will redirect to a file on: { bucket_name }/{ hostname }/{ index.html }.

My research have pointed me that using a server is unavoidable reading here but I still wonder about this integration. Thought to ask to expend my knowledge.

  • Is there any way to redirect a path url to a GetObject S3 API request?
  • Is there a way to map a header to API Gateway Service integration parameter? maybe by passthrough the request?
  • What is the Path override for?
  • How to set the bucket path?

Regarding "AWS Subdomain", it is mentioned to leave it blank on the main tutorial i found on this subject (here), but couldn't find a proper resource on what it is for, maybe on other services.

Would love to learn more.

< rant> i'm really struggling with AWS documentation, was wondering if it's just me. I'm an experienced engineer and I feel terrible looking for information in there. I've learned how to list my S3 buckets to the whole world before I've learned how to fetch an item ✌️ < /rant>

EladG
  • 794
  • 9
  • 21
  • Does this answer your question? [hosting multiple sites on S3 bucket serving index.html from directory path](https://stackoverflow.com/questions/45928994/hosting-multiple-sites-on-s3-bucket-serving-index-html-from-directory-path) – MyStackRunnethOver Apr 13 '20 at 22:26
  • no, i was asking about API Gateway s3 integration method, not really S3 static hosting of files – EladG Apr 13 '20 at 23:11

0 Answers0