title: Secure Amazon Gateway API to only be accessable from content in S3 bucket
body: <p>I have an API that's exposed to the public internet which I've created through Amazon's Gateway API service. API calls trigger a Lambda function that queries a backend database. The API that I've created is used by an S3 static webpage to fetch data.</p>
  
  <p>I'd like to secure my API so that only the contents of my S3 bucket (index.html) has permission to access my API. I'd like to prevent people from being able to query my API directly and scrape the data using curl requests, etc. I've read a little bit about IAM roles, Cognito, and the Lambda permissions model, but I'm unsure how to secure my API with all these different tools.</p>
  
  <p>What is the best way to secure my API so that only the content in my S3 bucket has permission to access my API?</p>