SlideShare a Scribd company logo
Serverless website analytics with Lambda@Edge
Jimmy Dahlqvist
AWS Ambassador
Community Builder
AWS-UG Scania, Sweden.
2024-08-24
@jimmydahlqvist
JIMMY DAHLQVIST
Head of AWS @ Sigma Technology Cloud
Founder of serverless-handbook.com
AWS Ambassador | AWS Community Builder | User Group
Leader
§
Hello, I'm
@jimmydahlqvist
Todays agenda
• Episode I: The Problem Awakens
• Episode II: Birth of a Solution
• Episode III: Revenge of the Gotchas
• Episode IV: A New Refined Solution
• Episode V: Summary
Episode I:
The Problem Awakens
@jimmydahlqvist
Website statistics
• Google Analytics
• Been my tracker for years
• Universal Analytics deprecated
• Way to advanced
• Open Source alternatives
• Plausible and Matomo
• Fathom Analytics
• Not free
@jimmydahlqvist
• I just want Easy way to understand my readers!
• How hard can it be?
• Could I track in the backend?
Episode II:
Birth of a Solution
@jimmydahlqvist
Thoughts
• No client side tracking
• Page (post), Time, and Country
• Can I integrate into my CloudFront distribution?
@jimmydahlqvist
Decoupled and event-driven
• Event-driven solution
• Decouple
• Ingestion
• Storage
• Analytics
CloudFront Integration points
@jimmydahlqvist
Lambda@Edge vs CloudFront Functions
Lambda@Edge
• All integration points
• Network access
• Up to 5 or 30 second duration
CloudFront Functions
• Viewer Request / Response
• No network access
• Sub millisecon duration
Ingestion
Data-store
Analytics
Episode III:
Revenge of the Gotchas
@jimmydahlqvist
Three problems
• Solution failed to deploy, cryptic error message
• There was missing data
• Page felt sluggish
@jimmydahlqvist
Gotcha
• Lambda@Edge and Functions won’t combine
• Lambda@Edge -> EventBridge high latency
• Glue and new lines
• CloudFront headers in cache policy
Episode IV:
A New Refined
Solution
@jimmydahlqvist
Needed to solve
• High Latency
• Time & Date
• Viewer type
A new hope
Serverless website analytics with Lambda@Edge
Serverless website analytics with Lambda@Edge
@jimmydahlqvist
Cost
• Managed Grafana - $9
• S3 - $5
• Glue - $2
• Total - $16
Episode V:
Summary
@jimmydahlqvist
• I know what blog post is accessed at what time
• I can visualize where in the world my users are locates
• I can create dashboards that show the information I need
Last 30 days
@jimmydahlqvist
Serverless Handbook
https://serverless-handbook.com/serverless-web-statistics
B
B
@jimmydahlqvist
dahlqvistjimmy
https://serverless-handbook.com
https://jimmydqv.com
THANK YOU

More Related Content

PPTX
Serverless website analytics with Lambda@Edge
PPTX
Encrypting data in S3 with Stepfunctions
PPTX
Cloud anti-patterns
PPTX
IoT Enabled Smoker for Great BBQ
PPTX
Cloud anti-patterns
PPTX
Cloud-grilled delights a high-tech approach to perfect BBQ
PDF
Google cloud big data summit master gcp big data summit la - 10-20-2015
PPTX
Building-resilient-serverless-workloads-Navigating-through-failure
Serverless website analytics with Lambda@Edge
Encrypting data in S3 with Stepfunctions
Cloud anti-patterns
IoT Enabled Smoker for Great BBQ
Cloud anti-patterns
Cloud-grilled delights a high-tech approach to perfect BBQ
Google cloud big data summit master gcp big data summit la - 10-20-2015
Building-resilient-serverless-workloads-Navigating-through-failure

Similar to Serverless website analytics with Lambda@Edge (20)

PPTX
Google Cloud and Data Pipeline Patterns
PPTX
IoT Enabled smoker for Great BBQ
PDF
How and why we use Drupal - a business owner's perspective
PPTX
Building MuleSoft Applications with Google BigQuery Meetup 4
PPTX
Building resilient serverless workloads: Navigating through failures
PDF
Getting started with GCP ( Google Cloud Platform)
PPTX
WordPress and Web Accessibility - 2013
PDF
Accelerate to Cloud
PPTX
Themes, Plugins and Accessibility
PDF
Engage 2020: Hello are you listening, There is stream for everything
PPTX
Serverless 2019 and Beyond
PPTX
SEC302 Twitter's GCP Architecture for its petabyte scale data storage in gcs...
PPTX
Event-driven and serverless in the world of IoT
PPTX
Building a serverless event driven Slack Bot
PDF
Get organized! Practical Tips for Agile (Tech Comm) Teams
PPTX
Wordpress and Web Accessibility Wordcamp UK 2014
PDF
Google Cloud Platform
PDF
Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017
PPTX
Serverless cloud architecture patterns
PDF
Technology tools for small business: Running your back office
Google Cloud and Data Pipeline Patterns
IoT Enabled smoker for Great BBQ
How and why we use Drupal - a business owner's perspective
Building MuleSoft Applications with Google BigQuery Meetup 4
Building resilient serverless workloads: Navigating through failures
Getting started with GCP ( Google Cloud Platform)
WordPress and Web Accessibility - 2013
Accelerate to Cloud
Themes, Plugins and Accessibility
Engage 2020: Hello are you listening, There is stream for everything
Serverless 2019 and Beyond
SEC302 Twitter's GCP Architecture for its petabyte scale data storage in gcs...
Event-driven and serverless in the world of IoT
Building a serverless event driven Slack Bot
Get organized! Practical Tips for Agile (Tech Comm) Teams
Wordpress and Web Accessibility Wordcamp UK 2014
Google Cloud Platform
Doing Big Data Using Amazon's Analogs - StampedeCon Big Data Conference 2017
Serverless cloud architecture patterns
Technology tools for small business: Running your back office
Ad

More from Jimmy Dahlqvist (14)

PPTX
AWS ECS and AWS Fargate demystified: run serverless containers
PPTX
Building a serverless AI powered translation service
PPTX
AI Powered event-driven translation bot
PPTX
Serverless and event-driven in a world of IoT
PPTX
Event-driven and serverless in the world of IoT
PPTX
IoT enable smoker for great BBQ
PPTX
Autoscaled Github Runners using StepFunctions
PPTX
EventBridge Patterns and real world use case
PPTX
re:Invent Recap Breakfast
PPTX
CI/CD As first and last line of defence
PPTX
Introduction to testing in Cloud / AWS
PPTX
CHAOS ENGINEERING – OR LET'S SHAKE THE TREE
PPTX
Road to an asynchronous device registration API
PPTX
GitOps in action, powered by Alexa.
AWS ECS and AWS Fargate demystified: run serverless containers
Building a serverless AI powered translation service
AI Powered event-driven translation bot
Serverless and event-driven in a world of IoT
Event-driven and serverless in the world of IoT
IoT enable smoker for great BBQ
Autoscaled Github Runners using StepFunctions
EventBridge Patterns and real world use case
re:Invent Recap Breakfast
CI/CD As first and last line of defence
Introduction to testing in Cloud / AWS
CHAOS ENGINEERING – OR LET'S SHAKE THE TREE
Road to an asynchronous device registration API
GitOps in action, powered by Alexa.
Ad

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
KodekX | Application Modernization Development
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Programs and apps: productivity, graphics, security and other tools
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Serverless website analytics with Lambda@Edge

Editor's Notes

  • #3: Hi! I'm Jimmy! I have worked with AWS and severless since 2015, almost a decade now, and I have seen all kind of strange things. I’m a true serverless enthusiast, the very first solution I built on AWS was serverless and I have not looked back since. I have built serverless solutions for a variaty of companies, from startups to large enterpices. I'm the founder of serverless-handbook.com where you can find all kind of serverless things that i have built, ranging from workshops to small architecture patterns. And I have my blog on Jimmydqv.com As a day-time job, and yes, I do have a daytime job, I know people have been questioning that. I work as Head of AWS at Sigma Technology Cloud, we are an advanced services partner with AWS and do all kind of fun solutions. If you like to know more about us, visit our booth outside.... I'm AWS Ambassador, AWS Community Builder and one of user Group leader for the Scania user group.
  • #5: Introduce the problem… Understand my readers.
  • #7: Frustration!! I just want to understand! How hard can it be?
  • #8: This got me thinking! Let’s try and build this!
  • #11: 4 integration points!
  • #16: After created the solution I run into some problems….