Skip to content

The article provides a push-button solution to protect your infrastructure against incoming traffic from embargoed countries as defined by OFAC

License

Notifications You must be signed in to change notification settings

Sathyafish/aws-waf-embargoed-countries-ofac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use AWS WAF to filter incoming traffic from embargoed countries

This project provides you with an automated solution that applies geography-based IP (GeoIP) restrictions based on a descriptive JSON file that lists all the locations that you want to block.

Authors

Rajat Ravinder Varuni & Heitor Vital

Building Lambda Package

cd deployment
./build-s3-dist.sh source-bucket-base-name source-bucket-key-prefix version

Where:

  • source-bucket-base-name: name for the S3 bucket location
  • source-bucket-key-prefix: folder prefix path inside the bucket
  • version: also used to compose where the template will source the Lambda code from

For example: ./build-s3-dist.sh awsiammedia public/sample/aws-waf-embargoed-countries-ofac v1.0 The template will then expect the source code to be located in:

  • bucket: awsiammedia
  • key prefix: public/sample/aws-waf-embargoed-countries-ofac/v1.0/

CF template and Lambda function

Located in deployment/dist

License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

About

The article provides a push-button solution to protect your infrastructure against incoming traffic from embargoed countries as defined by OFAC

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 77.6%
  • Shell 22.4%