Skip to content

PerimeterX/aws-lambda-edge-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Lambda@Edge Enforcer Sample Project

See the full official documentation for the Human Security AWS Lambda@Edge Enforcer here.

Use case

  1. This repo allows you to generate templates for each Human Security AWS Lambda@Edge Enforcer lambda Version 4 (and above).
  2. The lambdas are customized and allow you to:
    • Edit the enforcer configuration in a separate file.
    • Use async calls to fetch specific configuration values.
    • Add your custom logic to the enforcer request/response when the handler starts and before the handler finishes, and then send it to the next handler you define.

How to use

  1. git clone the project into your working directory.
  2. Install dependencies with npm install.
  3. Configure the enforcer by modifying the src/custom/config.ts file.
    Under this file you can find 3 types of configuration parameters:
    • Mandatory configuration fields that can be found under Mandatory configurations comment:
      • PX_APP_ID - The application ID (available in the portal)
      • PX_AUTH_TOKEN - The server token (available in the portal)
      • PX_COOKIE_SECRET - The cookie secret associated with the Bot Defender security policy (available in the portal)
    • All other configuration fields that you can read more about them here:
      • The simple ones under Simple function configuration comment.
      • Custom functions that can be found under Custom function configurations comment.
  4. Compile the enforcer by running npm run zip from the project directory.
  5. Choose the relevant lambda from the 3 generated lambda zip files:
    • PXEnforcer.zip
    • PXActivities.zip
    • PXFirstParty.zip

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published