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>