# Netacea Unified Handler

Detta dokument innehåller instruktioner för hur man driftsätter Netacea CloudFront-integrationen med en enda lambda-definition som hanterar tre händelsetyper.

Detta är ett alternativ till att använda individuella Viewer Request-, Viewer Response- och Origin Response-hanterare.

Att använda Unified Handler rekommenderas vid användning av Kinesis-inmatning, eftersom Kinesis-inmatning kan utföras i bakgrunden medan andra uppgifter hanteras av lambdan.

***

### Driftsättning

Unified Handler kan driftsättas på samma sätt som vilken som helst av de tre individuella lambdorna, enligt dokumentationen i avsnittet [Installation och konfiguration](https://docs.netacea.com/netacea-plugin-information/cloudfront/installation-and-configuration).

Hanteraren ska dock anges som `NetaceaUnified.handler` (snarare än exempelvis `ViewerRequest.handler`).

<figure><img src="https://1757243805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGUMNWETAzwSHwJ2JpW3%2Fuploads%2Fgit-blob-f7b94d54fc25fa0e5e1f05765ab74dcc0d1fceb8%2Fimage%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Slutligen ska dessa tre utlösare specificera Unified Handler-lambdan:

* `Viewer Request (Include body)`
* `Viewer Response`
* `Origin Response`

<figure><img src="https://1757243805-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYGUMNWETAzwSHwJ2JpW3%2Fuploads%2Fgit-blob-0186645c60260296c2c45a28b65d386fc77be6a2%2Fimage%20(132).png?alt=media" alt=""><figcaption></figcaption></figure>
