SlideShare uma empresa Scribd logo
1 de 43
Š 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
George John, Amazon Web Services
August 17, 2017
Deep Dive on Lambda@Edge
What to expect from this session
• Amazon CloudFront and AWS Lambda
• Lambda@Edge
• Tozny’s Lambda@Edge use case
• Getting started with Lambda@Edge
CloudFront: Global content delivery network
 Accelerate your application and APIs
 Include static content such as images and video
 Massively scalable
 Highly secure
 Self-service
 Priced to minimize cost
AWS Lambda: Serverless
Computing
Benefits of AWS Lambda
Continuous
scaling
No servers to
manage
Never pay for idle
– no cold servers
(only happy
accountants)
AWS Lambda@Edge:
Serverless Edge Computing
Introducing Lambda@Edge
• Lambda@Edge is an extension of AWS Lambda that allows you to run
Node.js code at global AWS locations
• Bring your own code to the Edge and customize your content very close to
your users, improving end-user experience
Continuous
scaling
No servers
to manage
Never pay for idle
– no cold servers
Globally
distributed
Write once, run everywhere
AWS
Location
AWS
Location
AWS
Location
AWS
Location
Origin server
AWS
Location
CloudFront triggers for Lambda@Edge
functions
CloudFront triggers for Lambda@Edge
functions
CloudFront cache
End user
Origin
server
Viewer request Origin request
Origin responseViewer response
Lambda@Edge events
• All Lambda@Edge invocations are synchronous
• Request events
• URI and header modifications can change the object being requested
• Viewer request can change the object being requested from the CloudFront
cache and the origin
• Origin request can change the object or path pattern being requested from the
origin
• Response events
• Origin response can modify what is cached and generate cacheable responses
to be returned to the viewer
• Viewer response can change what is returned to the viewer
CloudFront
cache
End user Origin
server
Viewer request Origin request
Origin responseViewer response
Lambda@Edge functionality
• Read and write access to headers, URIs, and
cookies across all triggers
• Ability to generate custom responses from
scratch
• Access to make network calls to external
resources on origin-facing hooks
So, what can I do with
Lambda@Edge?
Highly personalized websites
• Redirect viewers to the optimal
experience based on their location,
language preferences, and device type
Highly personalized websites – how?
• Trigger: Viewer request
• Inputs
• Requested URL
• Device type (i.e., User-Agent)
• Existing session data
• Output
• Generate a response directly from Lambda@Edge,
specifically a redirect to the most relevant experience (e.g. ,
cropped images and mobile sites for mobile users)
Pretty URLs
• Rewrite the URL end user's request
to serve content without exposing
your team’s internal directory
structure and organization
• Provide customized experiences
without compromising consistency in
what your viewers see
Pretty URLs – how?
• Trigger: Origin request
• Inputs
• URL requested
• Outputs
• Rewrite the requested URL, which will be passed to the origin
• The response will be cached based on what the customer
requested to serve subsequent requests (i.e., the pretty URL)
Authorization at the Edge
• Inspect cookies or custom headers to
authenticate clients right at the edge
• Enforce paywalls at the Edge to gate
access to premium content to only
authenticated viewers
Authorization at the Edge – how?
• Trigger: Viewer request
• Prerequisites
• The customer must have previously authenticated against your authoritative
service, resulting in some sort of authorization credential. Typically this is a
cookie.
• Inputs
• URL
• Authorization credential (cookie)
• Outputs
• Allow the request to succeed if the request is authorized. If not, either return
a 403 response or redirect to an authentication page
Limited access to content
• Enforce timed access to content
at the edge
• Make a call to an external
authentication server to confirm
if a user’s session is still valid
• Forward valid requests to the
origin, and serve redirects to
new users to login pages
Limited content access – How?
• Trigger: Origin request
• Inputs
• URL/cookies
• Access to external user-tracking database
• Outputs
• If a customer requests content for specific URLs or with
specific cookies, make a request to the external server to
confirm session validity.
• Based on response from external server, serve content, or
redirect to a login page.
Response generation at the Edge
Generate an HTTP response to end
user requests arriving at AWS locations:
• Generate customized error pages
and static websites directly from Edge
locations
• Combine content drawn from multiple
external resources to dynamically
build websites at the Edge
Response generation – how?
• Viewer or origin request event
• Inputs
• URI
• Headers
• Outputs
• Custom response based on URI and headers
Poll question
What functionality are you
most excited about using with
Lambda@Edge?
Let’s see it in action
Introducing
Lambda@Edge
For Scalable, Secure Browser Crypto
Isaac Potoczny-Jones
ijones@tozny.com
https://tozny.com
We help developers do crypto right
Crypto is vital for good security.
Use of Crypto is growing across the industry.
Most developers do crypto wrong.
We help developers do crypto right.
Good Crypto Makes Data Breaches Not Matter
$ per Record
Crypto Matters
Ponemon - http://www-03.ibm.com/security/infographics/data-breach/
Costs
Driven by
Disclosure
and
Lawsuit
Risk
Solutions
83% are misuses of cryptographic libraries by individual applications.”
- APSys ’14, June 25–26, 2014
“Our study covers 269 cryptographic vulnerabilities
reported in the CVE database from January 2011 to May 2014…
Challenge: Browser-Based Crypto
Typically considered to be less secure than smart-client crypto
• A good crypto client is a static, auditable codebase and secret key
• How do you trust the code delivered to the browser?
• How do you keep the key secret in the browser?
Where does Lambda@Edge come in?
• Our InnoVault Console is a static, single page app
• Crypto JavaScript, CSS, HTML delivered via CloudFront
• This gives us speed and scale
• But for security, we need to add various headers
• These headers are specific to our use case
Approach: Add Security Headers @Edge
• Content Security Policy: Only allow loading external JavaScript from
trusted domains
• Strict Transport Security: Tell the browser to only connect over
HTTPS to prevent MITM with plain HTTP
• XSS Protection: Tells the browser to cancel loading a page if
reflected Cross Site Scripting is detected
Result: Secure and Scalable JS Delivery
Lambda@Edge Function Code
'use strict';
exports.handler = (event, context, callback) => {
const headers = event.Records[0].cf.response.headers;
headers['Strict-Transport-Security'] = [{key: "Strict-Transport-Security",
value: "max-age=31 ..."}];
headers['Content-Security-Policy'] = [{key: "Content-Security-Policy",
value: "default-src ..."}];
headers['X-Content-Type-Options'] = [{key: "X-Content-Type-Options", value:
"nosniff"}];
headers['X-Frame-Options'] = [{key: "X-Frame-Options", value:
"DENY"}];
headers['X-XSS-Protection'] = [{key: "X-XSS-Protection", value: "1;
mode=block"}];
Node 6.10 Runtime
Returned HTTP Headers
Mozilla Observatory
Details on CloudFront Case Study
To get the slides and learn more:
https://tozny.com/blog/secure-https-headers-lambda/
Isaac Potoczny-Jones
ijones@tozny.com
https://tozny.com
Lambda@Edge: Getting Started
Lambda@Edge – let’s get started
• Sign up: https://aws.amazon.com/lambda/edge
Recap – using Lambda@Edge
Bring your own code
• Self-service through the
Lambda console
Familiar programming
model
• Standard Node.js-6.10
Write once, run everywhere
• Automatically deployed to the AWS network
of 79 Edge locations
• Requests are routed to the locations closest
to your end users across the world
Functionality
- Modify response header
- CloudFront response generation
- CloudFront HTTP redirect
Benefits
- Simple remote call at origin-facing hooks
- Cacheable static content generation
- Content generation with remote calls
Poll question
What functionality do you
want to see in
Lambda@Edge next?
Thank you!

Mais conteĂşdo relacionado

Mais procurados

Mais procurados (20)

serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)
 
Protecting your data in aws - Toronto
Protecting your data in aws - TorontoProtecting your data in aws - Toronto
Protecting your data in aws - Toronto
 
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum EfficiencyDeploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
 
IAM Best Practices to Live By - Pop-up Loft Tel Aviv
IAM Best Practices to Live By - Pop-up Loft Tel AvivIAM Best Practices to Live By - Pop-up Loft Tel Aviv
IAM Best Practices to Live By - Pop-up Loft Tel Aviv
 
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech TalksHands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
 
(STG406) Using S3 to Build and Scale an Unlimited Storage Service
(STG406) Using S3 to Build and Scale an Unlimited Storage Service(STG406) Using S3 to Build and Scale an Unlimited Storage Service
(STG406) Using S3 to Build and Scale an Unlimited Storage Service
 
AWS re:Invent 2016: Stop Managing Email Infrastructure: Move to Amazon WorkMa...
AWS re:Invent 2016: Stop Managing Email Infrastructure: Move to Amazon WorkMa...AWS re:Invent 2016: Stop Managing Email Infrastructure: Move to Amazon WorkMa...
AWS re:Invent 2016: Stop Managing Email Infrastructure: Move to Amazon WorkMa...
 
(SEC307) A Progressive Journey Through AWS IAM Federation Options
(SEC307) A Progressive Journey Through AWS IAM Federation Options(SEC307) A Progressive Journey Through AWS IAM Federation Options
(SEC307) A Progressive Journey Through AWS IAM Federation Options
 
Secure Content Delivery Using Amazon CloudFront
Secure Content Delivery Using Amazon CloudFrontSecure Content Delivery Using Amazon CloudFront
Secure Content Delivery Using Amazon CloudFront
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum EfficiencyDeploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
Deploying a Disaster Recovery Site on AWS: Minimal Cost with Maximum Efficiency
 
Content Delivery Using Amazon CloudFront - AWS Presentation - John Mancuso
Content Delivery Using Amazon CloudFront - AWS Presentation - John MancusoContent Delivery Using Amazon CloudFront - AWS Presentation - John Mancuso
Content Delivery Using Amazon CloudFront - AWS Presentation - John Mancuso
 
SEC303 Automating Security in cloud Workloads with DevSecOps
SEC303 Automating Security in cloud Workloads with DevSecOpsSEC303 Automating Security in cloud Workloads with DevSecOps
SEC303 Automating Security in cloud Workloads with DevSecOps
 
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸
 
Build on AWS: Delivering and Modernizing.
Build on AWS: Delivering and Modernizing. Build on AWS: Delivering and Modernizing.
Build on AWS: Delivering and Modernizing.
 
Devops on AWS
Devops on AWSDevops on AWS
Devops on AWS
 
SEC302 Becoming an AWS Policy Ninja using AWS IAM and AWS Organizations
SEC302 Becoming an AWS Policy Ninja using AWS IAM and AWS OrganizationsSEC302 Becoming an AWS Policy Ninja using AWS IAM and AWS Organizations
SEC302 Becoming an AWS Policy Ninja using AWS IAM and AWS Organizations
 
Running a Highly Scalable Immersive Media Solution on AWS Using EC2 Spot Inst...
Running a Highly Scalable Immersive Media Solution on AWS Using EC2 Spot Inst...Running a Highly Scalable Immersive Media Solution on AWS Using EC2 Spot Inst...
Running a Highly Scalable Immersive Media Solution on AWS Using EC2 Spot Inst...
 
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
 

Semelhante a Deep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks

Semelhante a Deep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks (20)

SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
 
Building Serverless Websites with Lambda@Edge - AWS Online Tech Talks
Building Serverless Websites with Lambda@Edge - AWS Online Tech TalksBuilding Serverless Websites with Lambda@Edge - AWS Online Tech Talks
Building Serverless Websites with Lambda@Edge - AWS Online Tech Talks
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the Edge
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
Build a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a RideBuild a Serverless Backend for Requesting a Ride
Build a Serverless Backend for Requesting a Ride
 
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft BroadridgeAWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
AWS FSI Symposium 2017 NYC - Moving at the Speed of Serverless ft Broadridge
 
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
 
Build a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million UsersBuild a Website on AWS for Your First 10 Million Users
Build a Website on AWS for Your First 10 Million Users
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Networking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless ApplicationsNetworking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless Applications
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
AWS Summit Barcelona 2015 - Introducing Amazon API GatewayAWS Summit Barcelona 2015 - Introducing Amazon API Gateway
AWS Summit Barcelona 2015 - Introducing Amazon API Gateway
 
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
Maximizing Audience Engagement in Media Delivery (MED303) | AWS re:Invent 2013
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
MongoDB World 2018: Tutorial - How to Build Applications with MongoDB Atlas &...
 
Getting started building your first serverless web application on AWS
Getting started building  your first serverless web application on AWSGetting started building  your first serverless web application on AWS
Getting started building your first serverless web application on AWS
 
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 minsAWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 

Mais de 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
 

Mais de 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Deep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks

  • 1. Š 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. George John, Amazon Web Services August 17, 2017 Deep Dive on Lambda@Edge
  • 2. What to expect from this session • Amazon CloudFront and AWS Lambda • Lambda@Edge • Tozny’s Lambda@Edge use case • Getting started with Lambda@Edge
  • 3. CloudFront: Global content delivery network  Accelerate your application and APIs  Include static content such as images and video  Massively scalable  Highly secure  Self-service  Priced to minimize cost
  • 5. Benefits of AWS Lambda Continuous scaling No servers to manage Never pay for idle – no cold servers (only happy accountants)
  • 7. Introducing Lambda@Edge • Lambda@Edge is an extension of AWS Lambda that allows you to run Node.js code at global AWS locations • Bring your own code to the Edge and customize your content very close to your users, improving end-user experience Continuous scaling No servers to manage Never pay for idle – no cold servers Globally distributed
  • 8. Write once, run everywhere AWS Location AWS Location AWS Location AWS Location Origin server AWS Location
  • 9. CloudFront triggers for Lambda@Edge functions
  • 10. CloudFront triggers for Lambda@Edge functions CloudFront cache End user Origin server Viewer request Origin request Origin responseViewer response
  • 11. Lambda@Edge events • All Lambda@Edge invocations are synchronous • Request events • URI and header modifications can change the object being requested • Viewer request can change the object being requested from the CloudFront cache and the origin • Origin request can change the object or path pattern being requested from the origin • Response events • Origin response can modify what is cached and generate cacheable responses to be returned to the viewer • Viewer response can change what is returned to the viewer CloudFront cache End user Origin server Viewer request Origin request Origin responseViewer response
  • 12. Lambda@Edge functionality • Read and write access to headers, URIs, and cookies across all triggers • Ability to generate custom responses from scratch • Access to make network calls to external resources on origin-facing hooks
  • 13. So, what can I do with Lambda@Edge?
  • 14. Highly personalized websites • Redirect viewers to the optimal experience based on their location, language preferences, and device type
  • 15. Highly personalized websites – how? • Trigger: Viewer request • Inputs • Requested URL • Device type (i.e., User-Agent) • Existing session data • Output • Generate a response directly from Lambda@Edge, specifically a redirect to the most relevant experience (e.g. , cropped images and mobile sites for mobile users)
  • 16. Pretty URLs • Rewrite the URL end user's request to serve content without exposing your team’s internal directory structure and organization • Provide customized experiences without compromising consistency in what your viewers see
  • 17. Pretty URLs – how? • Trigger: Origin request • Inputs • URL requested • Outputs • Rewrite the requested URL, which will be passed to the origin • The response will be cached based on what the customer requested to serve subsequent requests (i.e., the pretty URL)
  • 18. Authorization at the Edge • Inspect cookies or custom headers to authenticate clients right at the edge • Enforce paywalls at the Edge to gate access to premium content to only authenticated viewers
  • 19. Authorization at the Edge – how? • Trigger: Viewer request • Prerequisites • The customer must have previously authenticated against your authoritative service, resulting in some sort of authorization credential. Typically this is a cookie. • Inputs • URL • Authorization credential (cookie) • Outputs • Allow the request to succeed if the request is authorized. If not, either return a 403 response or redirect to an authentication page
  • 20. Limited access to content • Enforce timed access to content at the edge • Make a call to an external authentication server to confirm if a user’s session is still valid • Forward valid requests to the origin, and serve redirects to new users to login pages
  • 21. Limited content access – How? • Trigger: Origin request • Inputs • URL/cookies • Access to external user-tracking database • Outputs • If a customer requests content for specific URLs or with specific cookies, make a request to the external server to confirm session validity. • Based on response from external server, serve content, or redirect to a login page.
  • 22. Response generation at the Edge Generate an HTTP response to end user requests arriving at AWS locations: • Generate customized error pages and static websites directly from Edge locations • Combine content drawn from multiple external resources to dynamically build websites at the Edge
  • 23. Response generation – how? • Viewer or origin request event • Inputs • URI • Headers • Outputs • Custom response based on URI and headers
  • 24. Poll question What functionality are you most excited about using with Lambda@Edge?
  • 25. Let’s see it in action Introducing
  • 26. Lambda@Edge For Scalable, Secure Browser Crypto Isaac Potoczny-Jones ijones@tozny.com https://tozny.com
  • 27. We help developers do crypto right Crypto is vital for good security. Use of Crypto is growing across the industry. Most developers do crypto wrong. We help developers do crypto right.
  • 28. Good Crypto Makes Data Breaches Not Matter $ per Record Crypto Matters Ponemon - http://www-03.ibm.com/security/infographics/data-breach/ Costs Driven by Disclosure and Lawsuit Risk Solutions
  • 29. 83% are misuses of cryptographic libraries by individual applications.” - APSys ’14, June 25–26, 2014 “Our study covers 269 cryptographic vulnerabilities reported in the CVE database from January 2011 to May 2014…
  • 30. Challenge: Browser-Based Crypto Typically considered to be less secure than smart-client crypto • A good crypto client is a static, auditable codebase and secret key • How do you trust the code delivered to the browser? • How do you keep the key secret in the browser?
  • 31. Where does Lambda@Edge come in? • Our InnoVault Console is a static, single page app • Crypto JavaScript, CSS, HTML delivered via CloudFront • This gives us speed and scale • But for security, we need to add various headers • These headers are specific to our use case
  • 32. Approach: Add Security Headers @Edge • Content Security Policy: Only allow loading external JavaScript from trusted domains • Strict Transport Security: Tell the browser to only connect over HTTPS to prevent MITM with plain HTTP • XSS Protection: Tells the browser to cancel loading a page if reflected Cross Site Scripting is detected
  • 33. Result: Secure and Scalable JS Delivery
  • 34. Lambda@Edge Function Code 'use strict'; exports.handler = (event, context, callback) => { const headers = event.Records[0].cf.response.headers; headers['Strict-Transport-Security'] = [{key: "Strict-Transport-Security", value: "max-age=31 ..."}]; headers['Content-Security-Policy'] = [{key: "Content-Security-Policy", value: "default-src ..."}]; headers['X-Content-Type-Options'] = [{key: "X-Content-Type-Options", value: "nosniff"}]; headers['X-Frame-Options'] = [{key: "X-Frame-Options", value: "DENY"}]; headers['X-XSS-Protection'] = [{key: "X-XSS-Protection", value: "1; mode=block"}]; Node 6.10 Runtime
  • 37. Details on CloudFront Case Study
  • 38. To get the slides and learn more: https://tozny.com/blog/secure-https-headers-lambda/ Isaac Potoczny-Jones ijones@tozny.com https://tozny.com
  • 40. Lambda@Edge – let’s get started • Sign up: https://aws.amazon.com/lambda/edge
  • 41. Recap – using Lambda@Edge Bring your own code • Self-service through the Lambda console Familiar programming model • Standard Node.js-6.10 Write once, run everywhere • Automatically deployed to the AWS network of 79 Edge locations • Requests are routed to the locations closest to your end users across the world Functionality - Modify response header - CloudFront response generation - CloudFront HTTP redirect Benefits - Simple remote call at origin-facing hooks - Cacheable static content generation - Content generation with remote calls
  • 42. Poll question What functionality do you want to see in Lambda@Edge next?