title: How to make resource policy to limit the access to custom domain for lambda API gateway
body: <p>I have the API Gateway and lambda.</p>
  <p>API Gateway domain is like this below.</p>
  <p><a href="https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/" rel="nofollow noreferrer">https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/</a></p>
  <p>then , I set custom domain for lambda URL such as</p>
  <p><a href="https://xxxxxx.example.com" rel="nofollow noreferrer">https://xxxxxx.example.com</a></p>
  <p>However even after set this custom domain, access to <a href="https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/" rel="nofollow noreferrer">https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/</a> is available.</p>
  <p>I want to limit the access Gateway domain from only <code>https://xxxxxx.example.com</code></p>
  <p>I research around and found I should use Resource Policy.</p>
  <p>However how can I set the resource policy for API Gateway to limit the access??</p>
  <p>Honestly saying I have never write the resource policy from the scratch.</p>
  <p>Any hint is appreciated.</p>