SlideShare a Scribd company logo
1 of 24
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Customizing Content Delivery
with Lambda@Edge
C T D 4 1 5
Acar Erkek
Software Dev Engineer
Amazon Web Services
Alexander Korobeynikov
Software Dev Engineer
Amazon Web Services
github.com/aws-samples/aws-
lambda-edge-workshops
Now!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What to expect
• Brief presentation (~15min)
• Global serverless computing with AWS Lambda@Edge
• Overview of the workshop labs
• Meet the aliens. Time to build! (~90min)
• Workshop cost? Less than $0.5. Free tier applies.
AWS Credits worth of $25 at the end
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Launch the AWS CloudFormation stack
https://github.com/aws-samples/aws-lambda-edge-workshops
Google: aws lambda edge workshop
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Locations: Where is Your Customer?
150 Points of
Presence
65 cities
29 countries
18 AWS
Regions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda: Why Serverless?
Build and run applications without managing servers
• No servers to manage
• Run at scale
• Respond quickly to events
• Only pay for compute time that you use
• Developer productivity
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon CloudFront: Global Content Delivery
• Global, growing content delivery network
• High performance—speed up distribution of your static and
dynamic web content to your users across the world
• DDoS resiliency, scale, and cost effective
• Flexible and highly “programmable” with
AWS Lambda@Edge
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Global Serverless:
Run Lambda Functions Across AWS Locations
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Benefits of AWS Lambda@Edge
Continuous
scaling
No servers
to manage
Never pay
for idle
Global presence
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmable CloudFront; Lambda@Edge
User Agents Origin
Viewer
Response
Viewer
Request
Origin
Request
Origin
Response
CloudFront
Cache
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What Can You Do With Lambda@Edge?
High performance
Extend your apps to
AWS locations globally
No servers to manage
Simpler origin
Serverless
Program your CDN
Deliver personalized
experiences
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Meet the Un-Canny
Aliens have arrived, and established their bases over major
metropolitan areas across the Earth. After several failed
attempts of peaceful dialogue, we realized—we just can’t
communicate.
Humans and Aliens do not share a common language!
This is our last attempt, and world leaders are looking up to
you to deliver a high performance, highly available, and
serverless platform for Humans and Aliens to communicate
through —
Alien Connect!
Alien Cards (Kindergarten cards, but for Aliens) might be the
last chance for humanity… and it rests on your shoulders!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Alien Connect — the Serverless Stack
AWS
Lambda@Edge
Amazon
S3
Amazon
DynamoDB
Amazon
CloudFront
Lab Challenges!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#1 Enhance Security:
Secure your Alien Cards
Objective: let's check and improve your website security by configuring HTTP to HTTPs redirect and adding a
number of standard security headers to enforce HTTPS connection is always used and prevent XSS.
https://observatory.mozilla.org
Security Headers:
• Strict-Transport-Security
• Content-Security-Policy
• X-XSS-Protection
• X-Content-Type-Options
• X-Frame-Options
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#2 Generate Content:
View your Alien Cards, and Homepage
Objective: in this lab, you will enhance the look and feel of your web-site by using Lambda@Edge function
that dynamically generates HTML content that can be cached by CloudFront and returned back to your
viewers
Alien Card DetailsHomepage
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#3 Simple API:
Like Your Alien Cards
Objective: in this lab, you will enhance the look and feel of your web-site by using Lambda@Edge function
that dynamically generates HTML content that can be cached by CloudFront and returned back to your
viewers
POST /api/like?id=<card_id>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#4 Pretty URL:
Share Your Alien Cards
Objective: Objective: Make your URLs easy to remember and share
Before: https://d3rugkzdgfe4op.cloudfront.net/card/da8398f4
After: https://d3rugkzdgfe4op.cloudfront.net/tree
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#5 Optimize Content:
Optimize your Alien Homepage for the device type
Objective: Optimize look and feel depending on the viewer device type
Desktop Device Mobile Device
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Break into small groups or do it individually
• Launch CloudFormation stack
• Raise a hand if you have a question
or need help
• Share/Tweet as you build
#reinvent #lambda@edge
https://github.com/aws-samples/aws-lambda-edge-workshops
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Acar Erkek
Alexander Korobeynikov
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

What's hot (20)

Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
 
Introduction to Simulation with AWS RoboMaker (ROB304) - AWS re:Invent 2018
Introduction to Simulation with AWS RoboMaker (ROB304) - AWS re:Invent 2018Introduction to Simulation with AWS RoboMaker (ROB304) - AWS re:Invent 2018
Introduction to Simulation with AWS RoboMaker (ROB304) - AWS re:Invent 2018
 
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
Build a Searchable Media Library & Moderate Content at Scale Using Machine Le...
 
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
 
Deploy Alexa for Business in Your Organization & Build Your First Private Ski...
Deploy Alexa for Business in Your Organization & Build Your First Private Ski...Deploy Alexa for Business in Your Organization & Build Your First Private Ski...
Deploy Alexa for Business in Your Organization & Build Your First Private Ski...
 
Listen to Your Customers' Social Voice & Engage Them with Delightful Experien...
Listen to Your Customers' Social Voice & Engage Them with Delightful Experien...Listen to Your Customers' Social Voice & Engage Them with Delightful Experien...
Listen to Your Customers' Social Voice & Engage Them with Delightful Experien...
 
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
Running Enterprise Test/Dev on Amazon EC2 Spot Instances (CMP407-R1) - AWS re...
 
Manage Queries, and Audit Usage & Control Costs at Scale on Amazon Athena (AN...
Manage Queries, and Audit Usage & Control Costs at Scale on Amazon Athena (AN...Manage Queries, and Audit Usage & Control Costs at Scale on Amazon Athena (AN...
Manage Queries, and Audit Usage & Control Costs at Scale on Amazon Athena (AN...
 
Scale up a Web Application (ARC409-R) - AWS re:Invent 2018
Scale up a Web Application (ARC409-R) - AWS re:Invent 2018Scale up a Web Application (ARC409-R) - AWS re:Invent 2018
Scale up a Web Application (ARC409-R) - AWS re:Invent 2018
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
 
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
All About the Customer: GraphQL & Real-Time Subscriptions in Customer Service...
 
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
 
Lessons Learned from Building an AWS Service on AWS Lambda (SRV327-R1) - AWS ...
Lessons Learned from Building an AWS Service on AWS Lambda (SRV327-R1) - AWS ...Lessons Learned from Building an AWS Service on AWS Lambda (SRV327-R1) - AWS ...
Lessons Learned from Building an AWS Service on AWS Lambda (SRV327-R1) - AWS ...
 
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
AWS DevOps Essentials: An Introductory Workshop on CI/CD Best Practices (DEV3...
 
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
 
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
Build a Social News App with Android and AWS (MOB307) - AWS re:Invent 2018
 
Container Scheduling
Container SchedulingContainer Scheduling
Container Scheduling
 
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
 
SRV321 Deep Dive on Amazon EBS
 SRV321 Deep Dive on Amazon EBS SRV321 Deep Dive on Amazon EBS
SRV321 Deep Dive on Amazon EBS
 

Similar to Customizing Content Delivery with Lambda@Edge (CTD415-R1) - AWS re:Invent 2018

Similar to Customizing Content Delivery with Lambda@Edge (CTD415-R1) - AWS re:Invent 2018 (20)

Wildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel AvivWildrydes Serverless Workshop Tel Aviv
Wildrydes Serverless Workshop Tel Aviv
 
Living on the Edge with AWS Greengrass
Living on the Edge with AWS GreengrassLiving on the Edge with AWS Greengrass
Living on the Edge with AWS Greengrass
 
Making Headless Drupal Serverless
Making Headless Drupal ServerlessMaking Headless Drupal Serverless
Making Headless Drupal Serverless
 
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
 
Intro to AWS Cloud Development Kit | AWS Floor28
Intro to AWS Cloud Development Kit | AWS Floor28Intro to AWS Cloud Development Kit | AWS Floor28
Intro to AWS Cloud Development Kit | AWS Floor28
 
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
運用 AWS Edge Services 作為遊戲行業的關鍵基礎設施元件 (Level 200)
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
How to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda RuntimeHow to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda Runtime
 
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Chicago AWS Summit
 
[NEW LAUNCH!] Lambda Layers (SRV375) - AWS re:Invent 2018
[NEW LAUNCH!] Lambda Layers (SRV375) - AWS re:Invent 2018[NEW LAUNCH!] Lambda Layers (SRV375) - AWS re:Invent 2018
[NEW LAUNCH!] Lambda Layers (SRV375) - AWS re:Invent 2018
 
Building serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS SummitBuilding serverless enterprise applications - SRV315 - Toronto AWS Summit
Building serverless enterprise applications - SRV315 - Toronto AWS Summit
 
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes ...
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
 
Serverless Architectural Patterns: Collision 2018
Serverless Architectural Patterns: Collision 2018Serverless Architectural Patterns: Collision 2018
Serverless Architectural Patterns: Collision 2018
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about servers
 
Gluecon 2018 - The Best Practices and Hard Lessons Learned of Serverless Appl...
Gluecon 2018 - The Best Practices and Hard Lessons Learned of Serverless Appl...Gluecon 2018 - The Best Practices and Hard Lessons Learned of Serverless Appl...
Gluecon 2018 - The Best Practices and Hard Lessons Learned of Serverless Appl...
 
Websites Go Serverless: AWS Developer Workshop - Web Summit 2018
Websites Go Serverless: AWS Developer Workshop - Web Summit 2018Websites Go Serverless: AWS Developer Workshop - Web Summit 2018
Websites Go Serverless: AWS Developer Workshop - Web Summit 2018
 
How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Customizing Content Delivery with Lambda@Edge (CTD415-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Customizing Content Delivery with Lambda@Edge C T D 4 1 5 Acar Erkek Software Dev Engineer Amazon Web Services Alexander Korobeynikov Software Dev Engineer Amazon Web Services github.com/aws-samples/aws- lambda-edge-workshops Now!
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What to expect • Brief presentation (~15min) • Global serverless computing with AWS Lambda@Edge • Overview of the workshop labs • Meet the aliens. Time to build! (~90min) • Workshop cost? Less than $0.5. Free tier applies. AWS Credits worth of $25 at the end
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Launch the AWS CloudFormation stack https://github.com/aws-samples/aws-lambda-edge-workshops Google: aws lambda edge workshop
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Locations: Where is Your Customer? 150 Points of Presence 65 cities 29 countries 18 AWS Regions
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda: Why Serverless? Build and run applications without managing servers • No servers to manage • Run at scale • Respond quickly to events • Only pay for compute time that you use • Developer productivity
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon CloudFront: Global Content Delivery • Global, growing content delivery network • High performance—speed up distribution of your static and dynamic web content to your users across the world • DDoS resiliency, scale, and cost effective • Flexible and highly “programmable” with AWS Lambda@Edge
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Global Serverless: Run Lambda Functions Across AWS Locations
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Benefits of AWS Lambda@Edge Continuous scaling No servers to manage Never pay for idle Global presence
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmable CloudFront; Lambda@Edge User Agents Origin Viewer Response Viewer Request Origin Request Origin Response CloudFront Cache
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What Can You Do With Lambda@Edge? High performance Extend your apps to AWS locations globally No servers to manage Simpler origin Serverless Program your CDN Deliver personalized experiences
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Meet the Un-Canny Aliens have arrived, and established their bases over major metropolitan areas across the Earth. After several failed attempts of peaceful dialogue, we realized—we just can’t communicate. Humans and Aliens do not share a common language! This is our last attempt, and world leaders are looking up to you to deliver a high performance, highly available, and serverless platform for Humans and Aliens to communicate through — Alien Connect! Alien Cards (Kindergarten cards, but for Aliens) might be the last chance for humanity… and it rests on your shoulders!
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Alien Connect — the Serverless Stack AWS Lambda@Edge Amazon S3 Amazon DynamoDB Amazon CloudFront
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. #1 Enhance Security: Secure your Alien Cards Objective: let's check and improve your website security by configuring HTTP to HTTPs redirect and adding a number of standard security headers to enforce HTTPS connection is always used and prevent XSS. https://observatory.mozilla.org Security Headers: • Strict-Transport-Security • Content-Security-Policy • X-XSS-Protection • X-Content-Type-Options • X-Frame-Options
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. #2 Generate Content: View your Alien Cards, and Homepage Objective: in this lab, you will enhance the look and feel of your web-site by using Lambda@Edge function that dynamically generates HTML content that can be cached by CloudFront and returned back to your viewers Alien Card DetailsHomepage
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. #3 Simple API: Like Your Alien Cards Objective: in this lab, you will enhance the look and feel of your web-site by using Lambda@Edge function that dynamically generates HTML content that can be cached by CloudFront and returned back to your viewers POST /api/like?id=<card_id>
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. #4 Pretty URL: Share Your Alien Cards Objective: Objective: Make your URLs easy to remember and share Before: https://d3rugkzdgfe4op.cloudfront.net/card/da8398f4 After: https://d3rugkzdgfe4op.cloudfront.net/tree
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. #5 Optimize Content: Optimize your Alien Homepage for the device type Objective: Optimize look and feel depending on the viewer device type Desktop Device Mobile Device
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Break into small groups or do it individually • Launch CloudFormation stack • Raise a hand if you have a question or need help • Share/Tweet as you build #reinvent #lambda@edge https://github.com/aws-samples/aws-lambda-edge-workshops
  • 23. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Acar Erkek Alexander Korobeynikov
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.