Centinel AnalyticaCentinel Analytica
Platforms

AWS CloudFront

Deploy Centinel Analytica on an existing CloudFront distribution via Lambda@Edge.

Overview

This guide covers the console workflow for installing the Centinel Lambda@Edge function. After associating the function, allow 15-20 minutes for CloudFront to propagate the protection globally.

Prerequisites

  • Centinel secret key
  • CloudFront distribution you can edit
  • AWS Console access with Lambda and CloudFront permissions
Prepare the package
  1. Download centinel-cloudfront.js.
  2. Open the file and replace the empty CENTINEL_SECRET_KEY value with your key.
  3. Zip the modified centinel-cloudfront.js to create a deployment archive.
Create the Lambda function
  1. Switch the AWS Console region to N. Virginia (us-east-1).
  2. Go to Lambda → Create function → Author from scratch.
  3. Name the function (e.g. centinel-cloudfront), choose Node.js 20.x, and create it.
  4. In the Code tab, select Upload from → .zip file and upload your archive.
  5. Under Configuration → General configuration, set Timeout to 5 seconds and Memory to 128 MB.
  6. Choose Actions → Publish new version and note the versioned ARN.
Associate with CloudFront
  1. Open CloudFront → Distributions, select the distribution to protect, and edit the cache behavior you want covered.
  2. In Function associations, click Add function, choose Lambda@Edge, paste the versioned ARN, and set the event type to Viewer request.
  3. Save the behavior to start global deployment.
Verify deployment
  • Watch the distribution status until it says Deployed (15-20 minutes).
  • Browse the distribution domain to confirm traffic flows normally.
  • Check CloudWatch logs for entries prefixed with [Centinel] if you need to troubleshoot.

Changelog

  • 1.0.2 - Fixed typo.
  • 1.0.1 - Better performance.
  • 1.0.0 - Initial release.

On this page