This repository tries to demonstrate how we can leverage Adobe Target NodeJS SDK On-Device Decisioning functionality from an Akamai Edge Worker.
There are a few prerequisites:
AkamaicredentialsAkamai CLIAkamai CLIwithEdge Workersplugin enabledAkamaicontract withEdge Workersenabled. You'll need Ion or similar product, please checkAkamaidocumentation
In order to use Akamai CLI we need credentials, using Akamai IAM we should create a so called "API Client". Once the API Client is created we can download the credentials and add them to .edgerc file in our user home directory.
To make sure we can use the credentials from .edgerc we will have to pass the "section" as a parameter. If we have an .edgerc with a section named [default], then when using Akamai CLI we will have to invoke any command using this:
$ akamai --secion=default ....We will need to instal Akamai CLI, on Mac OS X this can be done using Homebrew, like this:
$ brew install akamaiWe will need to add Edge Workers support to Akamai CLI. This can be done by running:
$ akamai install edgeworkersIn order to automate the Akamai provisioning for Akamai EdgeWorkers we will be using Terraform. To make it easier to navigate the repository, the code is split in:
terraform- this folder contains all theTerraformscripts required to provision resources like edge host name, property, etcscript- this folder contains the source code forAkamai EdgeWorkerplus all the build and bundling logic.