Protect Amazon API Gateway with Amazon CloudFront and AWS WAF

AWS WAF → Amazon CloudFront → Amazon API Gateway → Lambda@Edge → AWS Lambda → Authorizer

Provision an Amazon API Gateway (with Amazon CloudFront and AWS WAF) using Terraform

This pattern demonstrates how to increase the security posture of HTTP API Gateways against common attack patterns such as SQL injection, cross-site scripting (XSS) or DDOS attacks

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-http-api-waf-cloudfront-terraform

Deploy

See the GitHub repo for detailed deployment instructions.


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

See the GitHub repo for detailed cleanup instructions.

Created by:

Mehdi Amrane

Senior Solutions Architect at AWS