Code Monkey home page Code Monkey logo

aws-cloudfront-waf-ip-set's Introduction

CloudFront WAF IP Set

This project creates a WAF and IP Set that are scoped to the CloudFront IP Ranges. Customers can then use this WAF to only allow traffic to an Application load balancer or API gateway from a CloudFront Distribution.

Components

This stack deploys the following components

  • WAF: an AWS Web application firewall
  • IP Set: an IP Set scopped to the CloudFront ranges
  • Lambda: AWS lambda is used to parse the IP-Ranges.json file and update the IP set with the CloudFront ranges. This lambda is subscriped to an SNS topic that will trigger these changes automatically as AWS publishes new ranges.

Deployment

To deploy this solution run the below script from the root of the project.

npm install
cdk bootstrap
cdk deploy

Once the CDK project is finished deploying, you must manually associate the AWS Resources with your newly created WAF for them to be protected.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-cloudfront-waf-ip-set's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aws-cloudfront-waf-ip-set's Issues

WAF ACL does not show up in CloudFront

I have run this as per the readme file, and it successully created a WAF ACL. However that WAF ACL is not visible in CloudFront when creating a new distribution. I think the WAF ACL (and related settings) need to be created in the global region, whereas this cdk uses the default user's default region (ie. us-east-1), however global is not a valid region for cdk so doing export AWS_DEFAULT_REGION=global before running cdk bootstrap does not work.
Perhaps there is another setting required in the cdk call to create the WAF ACL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.