{"id":22894276,"url":"https://github.com/clearcodehq/cookie-sync-lambda","last_synced_at":"2025-08-04T09:32:39.305Z","repository":{"id":69040300,"uuid":"101858514","full_name":"ClearcodeHQ/cookie-sync-lambda","owner":"ClearcodeHQ","description":"Example implementation of cookie syncing using AWS Lambda@Edge","archived":false,"fork":false,"pushed_at":"2018-09-27T12:53:01.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T19:35:55.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClearcodeHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-30T08:40:33.000Z","updated_at":"2021-12-16T06:08:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1a6d41e-f502-4e4a-b1c6-0e482efd94d4","html_url":"https://github.com/ClearcodeHQ/cookie-sync-lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ClearcodeHQ/cookie-sync-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClearcodeHQ%2Fcookie-sync-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClearcodeHQ%2Fcookie-sync-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClearcodeHQ%2Fcookie-sync-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClearcodeHQ%2Fcookie-sync-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClearcodeHQ","download_url":"https://codeload.github.com/ClearcodeHQ/cookie-sync-lambda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClearcodeHQ%2Fcookie-sync-lambda/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268675515,"owners_count":24288285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T23:17:22.595Z","updated_at":"2025-08-04T09:32:39.289Z","avatar_url":"https://github.com/ClearcodeHQ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Edge Cookie Sync\n\nA proof of concept of using AWS Lambda Edge for redirect logic of cookie syncing endpoint.\nCreated for a AWS blog post available here https://aws.amazon.com/blogs/networking-and-content-delivery/leveraging-lambda-at-edge-for-adtech-cookie-syncing-at-the-edge/\n\n## Running locally\n\n* Install Node.js 6\n* Install dependencies `npm install .`\n\nTest with different event contents\n\n    ./node_modules/.bin/lambda-local -f index.js -e event.json\n    ./node_modules/.bin/lambda-local -f index.js -e event_nocookie.json\n\n## Running in AWS\n\nSet up Lambda function and CloudFront following the instructions in the blog post.\nUse the console snippets or your browser for tests.\n\nDefault response\n\n    curl -v 'https://[DISTRIBUTION_ADDRESS]/pixel.gif';\n\nCreating new cookie identifier when no cookie is present\n\n    curl -v 'https://[DISTRIBUTION_ADDRESS]/getuid/https://id.dmp.com/dsp_uid/$UID';\n\n\nExtending lifespan of existing cookie\n\n    curl -v 'https://[DISTRIBUTION_ADDRESS]/getuid/https://id.dmp.com/dsp_uid/$UID' \\\n        -H 'Cookie: dsp_uid=93fcefd8-d5ea-40e8-9eb1-dca37e850cc5;';\n\nAuthor: Z. Hartleb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearcodehq%2Fcookie-sync-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclearcodehq%2Fcookie-sync-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclearcodehq%2Fcookie-sync-lambda/lists"}