Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws lambda domain whitelist

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?

like image 931
Ruegen Avatar asked Nov 03 '25 17:11

Ruegen


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]
like image 177
megasubhash Avatar answered Nov 05 '25 10:11

megasubhash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!