getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
916 stars 113 forks source link

Prevent direct access to CloudFront origins #391

Open jaulz opened 5 months ago

jaulz commented 5 months ago

Start from the Use-case

It would be great if we could somehow prevent direct access to the API Gateway and only allow access via CloudFront (see https://www.youtube.com/watch?v=9TlWF0-Ah8Q). Hence, it would be great if we could set custom headers of the CloudFront origin and customize the web application firewall of the API Gateway.

Example Config

No response

Implementation Idea

No response