aws lambda domain whitelist

Viewed 1856

I am hoping to restrict an aws lambda to a specific domain (maybe whitelist local dev too) with a specific domain so that others can't use the lambda if they reach it from a domain that isn't in a whitelist.

Is this possible as a service?

1 Answers

enter image description hereAWS Lambda will not work alone itself you need to integrate with API Gateway or any other services. As per your requirement, you need to integrate your Lambda with API Gateway. Now follow the step:

  • Go to API Gateway
  • Select your API
  • Click Action->Enable Cors
  • Fill your domain inside Access-Control-Allow-Origin field. e.g; dev.yourdomain.com [Screenshot][2]
Related