SlideShare a Scribd company logo
1 of 50
Download to read offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is happening at the Edge?
Danilo Poccia, Technical Evangelist
@danilop
How are IT architectures evolving?
Client
Client Back End
Share data

with other clients
(Database)
Can’t trust the client

(Security)
Need more power
(compute, storage,

network)
Client Back End
Business
Logic
Share data

with other clients
(Database)
Can’t trust the client

(Security)
Need more power
(compute, storage,

network)
Client Back End
Latency
Bandwidth
Business
Logic
Share data

with other clients
(Database)
Can’t trust the client

(Security)
Need more power
(compute, storage,

network)
AWS Global Infrastructure
Region & Number of
Availability Zones
New Region
(coming soon)
Client Back End
Latency
Bandwidth
CDNClient Back End
Amazon CloudFront Edge Infrastructure
CDNClient Back End
CDNClient Back End
CDNClient Back End Devices
Sensors
Actuators
AWS IoT
CDNClient Back End Devices
Sensors
Actuators
CDNClient Back End Devices
Sensors
Actuators
Latency
Bandwidth
Connectivity
State
Provisioning
Group
CDNClient Back End Devices
Sensors
Actuators
Gateway
AWS Greengrass
Greengrass Features
Local Support for AWS
Lambda
Local Support for AWS IoT
Devices Shadows
Local Messaging
Hardware Ecosystem
CDNClient Back End Devices
Sensors
Actuators
Gateway
CDNClient Back End Devices
Sensors
Actuators
Gateway
Optimize Latency, Bandwidth, Connectivity,
State Management, Software Provisioning
CDNClient Back End Devices
Sensors
Actuators
Gateway
Distribute & Run Custom Logic
Optimize Latency, Bandwidth, Connectivity,
State Management, Software Provisioning
CDNClient Back End Devices
Sensors
Actuators
AWS
Lambda
Gateway
Optimize Latency, Bandwidth, Connectivity,
State Management, Software Provisioning
CDNClient Back End Devices
Sensors
Actuators
++
Amazon
CloudFront
AWS
Lambda
AWS
Lambda
AWS
Lambda
AWS
Greengrass
Gateway
CDNClient Back End Devices
Sensors
Actuators
++
Amazon
CloudFront
AWS
Lambda
AWS
Lambda
AWS
Lambda
AWS
Greengrass
Gateway
Greengrass Example Functions
import greengrasssdk
import platform
from threading import Timer
import time
# Creating a greengrass core sdk client
client = greengrasssdk.client('iot-data')
my_platform = platform.platform()
def greengrass_hello_world_run():
if not my_platform:
client.publish(topic=‘hello/world',
payload='Hello world! Sent from Greengrass Core.')
else:
client.publish(topic=‘hello/world’,
payload='Hello world! Sent from Greengrass Core running on platform: {}'.format(my_platform))
# Asynchronously schedule this function to be run again in 5 seconds
Timer(5, greengrass_hello_world_run).start()
# Execute the function above
greengrass_hello_world_run()
# This is a dummy handler and will not be invoked
def function_handler(event, context):
return
Long-Lived Functions (running indefinitely)
On-Demand Functions
Greengrass Example Functions
import greengrasssdk
import platform
import json
# Creating a greengrass core sdk client
client = greengrasssdk.client('iot-data')
# Retrieving platform information to send from Greengrass Core
my_platform = platform.platform()
def function_handler(event, context):
print("Received event: " + json.dumps(event, indent=2))
message = {}
message['debug'] = 'I just recevied this event: {}'.format(json.dumps(event, indent=2))
if not my_platform:
message['text'] = 'Hello World! Sent from Greengrass Core.'
else:
message['text'] = 'Hello World! Sent from Greengrass Core running on platform: {}'.format(my_platform)
client.publish(topic='hello/world', payload=json.dumps(message))
return
Greengrass Demo
Greengrass Benefits
Operate Offline
Secure

Communication
Simplified Devices
Programming
Reduce the Cost of
Running IoT Applications
Respond to Local Events
in Near Real-time
AWS Snowball Edge
100TB + Greengrass Core (≃ EC2 m4.4xlarge instance)
Snowball Edge Use Cases
“Snowball Edge enables us to extend the
innovative capabilities of HealthSuite, our cloud-
enabled connected health ecosystem of devices,
applications and digital tools supported by AWS,
even when there is no network support.”
Embedded Applications
—Dale Wiggins,
Business Leader, HealthSuite digital platform,
Philips
Snowball Edge Use Cases
“With AWS Snowball Edge, we can now collect
100 TB of data with no intermediate steps, and
we can also analyze the images immediately
using the onboard compute capabilities.”
Remote Locations for data collection and analysis
— Bob Cowen,
Director of Hatfield Marine Research Center,
Oregon State University
CDNClient Back End Devices
Sensors
Actuators
++
Amazon
CloudFront
AWS
Lambda
AWS
Lambda
AWS
Lambda
AWS
Greengrass
Gateway
CDNClient Back End Devices
Sensors
Actuators
++
Amazon
CloudFront
AWS
Lambda
AWS
Lambda
AWS
Lambda
AWS
Greengrass
Gateway
AWS Lambda@Edge
Customize your content delivery while reducing load on your origin
Events / Triggers
Take serverless to your users
Lambda@Edge
Event Structure
{
"Records": [
{
"cf": {
"config": {
"distributionId": "EDFDVBD6EXAMPLE"
},
"request": {
"clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334",
"method": "GET",
"uri": "/picture.jpg",
"headers": {
"host": [
{
"key": "Host",
"value": "d111111abcdef8.cloudfront.net"
}
],
"user-agent": [
{
"key": "User-Agent",
"value": "curl/7.51.0"
}
]
}
}
}
}
]
}
{
"Records": [
{
"cf": {
"config": {
"distributionId": "EDFDVBD6EXAMPLE"
},
"request": {
"clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334",
"method": "GET",
"uri": "/picture.jpg",
"headers": {
"host": [
{
"key": "Host",
"value": "d111111abcdef8.cloudfront.net"
}
],
"user-agent": [
{
"key": "User-Agent",
"value": "curl/7.18.1"
}
]
}
},
"response": {
"status": "200",
"statusDescription": "OK",
"headers": {
"server": [
{
"key": "Server",
"value": "MyCustomOrigin"
}
],
"set-cookie": [
{
"key": "Set-Cookie",
"value": "theme=light"
},
{
"key": "Set-Cookie",
"value": "sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT"
}
]
}
}
}
}
]
}
Request
Event
Response
Event
http://amzn.to/2hunJuA
Creating Lambda@Edge Functions
Lambda replicates
the function to
AWS Regions and
CloudFront edge
locations around the
globe
Replicas can't be

edited or deleted
Lambda@Edge Example Functions
'use strict';
exports.handler = (event, context, callback) => {
/*
* Generate HTTP redirect response with 302 status code and Location header.
*/
const response = {
status: '302',
statusDescription: 'Found',
headers: {
location: [{
key: 'Location',
value: 'http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html',
}],
},
};
callback(null, response);
};
cloudfront-http-redirect
Lambda@Edge Example Functions
'use strict';
exports.handler = (event, context, callback) => {
/*
* Generate HTTP response using 200 status code with a simple body.
*/
const response = {
status: '200',
statusDescription: 'OK',
headers: {
vary: [{
key: 'Vary',
value: '*',
}],
'last-modified': [{
key: 'Last-Modified',
value: '2017-01-13',
}],
},
body: 'Example body generated by Lambda@Edge function.',
};
callback(null, response);
};
cloudfront-response-generation
Lambda@Edge
Example Functions
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
if (request.uri !== '/experiment-pixel.jpg') {
// do not process if this is not an A-B test request
callback(null, request);
return;
}
const cookieExperimentA = 'X-Experiment-Name=A';
const cookieExperimentB = 'X-Experiment-Name=B';
const pathExperimentA = '/experiment-group/control-pixel.jpg';
const pathExperimentB = '/experiment-group/treatment-pixel.jpg';
let experimentUri;
if (headers.cookie) {
for (let i = 0; i < headers.cookie.length; i++) {
if (headers.cookie[i].value.indexOf(cookieExperimentA) >= 0) {
console.log('Experiment A cookie found');
experimentUri = pathExperimentA;
break;
} else if (headers.cookie[i].value.indexOf(cookieExperimentB) >= 0)
{
console.log('Experiment B cookie found');
experimentUri = pathExperimentB;
break;
}
}
}
if (!experimentUri) {
console.log('Experiment cookie has not been found. Throwing dice...');
if (Math.random() < 0.75) {
experimentUri = pathExperimentA;
} else {
experimentUri = pathExperimentB;
}
}
request.uri = experimentUri;
console.log(`Request uri set to "${request.uri}"`);
callback(null, request);
};
A/B Testing
http://amzn.to/2hoarw4
Lambda@Edge Demo
Lambda@Edge Benefits
Global Continuous Scaling
Reduce Origin Load Subsecond Metering
Lambda@Edge Use Cases
URL Rewrites
Access Control at the Edge
Lambda@Edge Use Cases
URL Rewrites
Access Control at the Edge
Response Generation At Viewer Request
Remote Network Calls
Lambda@Edge Use Cases
URL Rewrites
Access Control at the Edge
Response Generation At Viewer Request
Remote Network Calls
A/B Testing
Highly Personalized Websites
Lambda@Edge Use Cases
Demo build of a
CloudFront+S3 distribution,
using Lambda@Edge
to secure its HTTP headers
CDNClient Back End Devices
Sensors
Actuators
++
Amazon
CloudFront
AWS
Lambda
AWS
Lambda
AWS
Lambda
AWS
Greengrass
Gateway
CDNClient Back End Devices
Sensors
Actuators
AWS
Lambda
Gateway
Optimize your IT Architectures at the Edge
Push Business Logic Closer to Users & Devices
Use the Same Serverless Programming Model
Create a Better User Experience for Your Customers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank You
@danilop

More Related Content

What's hot

Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017Amazon Web Services
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceAmazon Web Services
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...Amazon Web Services
 
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & SecurityAmazon Web Services
 
Enterprise-Grade IoT Infrastructure and Connectivity on AWS
Enterprise-Grade IoT Infrastructure and Connectivity on AWSEnterprise-Grade IoT Infrastructure and Connectivity on AWS
Enterprise-Grade IoT Infrastructure and Connectivity on AWSAmazon Web Services
 
AWS IoT - Introduction - Pop-up Loft
AWS IoT - Introduction - Pop-up LoftAWS IoT - Introduction - Pop-up Loft
AWS IoT - Introduction - Pop-up LoftAmazon Web Services
 
微服務與 Docker 深入探討
微服務與 Docker 深入探討微服務與 Docker 深入探討
微服務與 Docker 深入探討Amazon Web Services
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineAmazon Web Services
 
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...Amazon Web Services
 
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...Amazon Web Services
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWSAmazon Web Services
 
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...Amazon Web Services
 
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...Amazon Web Services
 
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017Amazon Web Services
 
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)Amazon Web Services
 
Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Kristana Kane
 
February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive Amazon Web Services
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSAmazon Web Services
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessAmazon Web Services
 

What's hot (20)

Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
Distributed Serverless Stack Tracing and Monitoring - DevDay Los Angeles 2017
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container Service
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
 
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
(SEC314) AWS for the Enterprise: Implementing Policy, Governance & Security
 
Enterprise-Grade IoT Infrastructure and Connectivity on AWS
Enterprise-Grade IoT Infrastructure and Connectivity on AWSEnterprise-Grade IoT Infrastructure and Connectivity on AWS
Enterprise-Grade IoT Infrastructure and Connectivity on AWS
 
AWS IoT - Introduction - Pop-up Loft
AWS IoT - Introduction - Pop-up LoftAWS IoT - Introduction - Pop-up Loft
AWS IoT - Introduction - Pop-up Loft
 
微服務與 Docker 深入探討
微服務與 Docker 深入探討微服務與 Docker 深入探討
微服務與 Docker 深入探討
 
Programming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules EngineProgramming the Physical World with Device Shadows and Rules Engine
Programming the Physical World with Device Shadows and Rules Engine
 
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
AWS re:Invent 2016: Test and Debug Your Mobile Apps on Real Android and iOS D...
 
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...
Getting Started with AWS IoT and the Dragon IoT Starter Kit - AWS May 2016 We...
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...
Hands On Lab: Introduction to Microsoft SQL Server in AWS - April 2017 AWS On...
 
Media Workloads on AWS
Media Workloads on AWSMedia Workloads on AWS
Media Workloads on AWS
 
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
 
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
How to Connect Your Own Creations with AWS IoT - DevDay Los Angeles 2017
 
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
 
Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps
 
February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive February 2016 Webinar Series - EC2 Container Service Deep Dive
February 2016 Webinar Series - EC2 Container Service Deep Dive
 
Serverless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWSServerless Geospatial Mobile Apps with AWS
Serverless Geospatial Mobile Apps with AWS
 
Getting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and ServerlessGetting Started with AWS Lambda and Serverless
Getting Started with AWS Lambda and Serverless
 

Similar to What Is Happening At The Edge

AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...Cobus Bernard
 
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018Amazon Web Services
 
Getting Started with AWS IoT - IOT203 - re:Invent 2017
Getting Started with AWS IoT - IOT203 - re:Invent 2017Getting Started with AWS IoT - IOT203 - re:Invent 2017
Getting Started with AWS IoT - IOT203 - re:Invent 2017Amazon Web Services
 
IOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTIOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTAmazon Web Services
 
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...Amazon Web Services
 
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...Amazon Web Services
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxAmazon Web Services
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps_Fest
 
When IoT meets Serverless - from design to production and monitoring
When IoT meets Serverless - from design to production and monitoringWhen IoT meets Serverless - from design to production and monitoring
When IoT meets Serverless - from design to production and monitoringAlex Pshul
 
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
.NET Fest 2019. Alex Pshul. When IoT Meets ServerlessNETFest
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...MSDEVMTL
 
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & RulesAmazon Web Services
 
Creating a Java Internet of Things Gateway
Creating a Java Internet of Things GatewayCreating a Java Internet of Things Gateway
Creating a Java Internet of Things GatewayEurotech
 
How to build a Citrix infrastructure on AWS
How to build a Citrix infrastructure on AWSHow to build a Citrix infrastructure on AWS
How to build a Citrix infrastructure on AWSDenis Gundarev
 
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界Amazon Web Services
 
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWS
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWSAWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWS
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWSAmazon Web Services
 
Giga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching OverviewGiga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching Overviewjimliddle
 
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...Amazon Web Services
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015Amazon Web Services Korea
 
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon Web Services Korea
 

Similar to What Is Happening At The Edge (20)

AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
 
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
 
Getting Started with AWS IoT - IOT203 - re:Invent 2017
Getting Started with AWS IoT - IOT203 - re:Invent 2017Getting Started with AWS IoT - IOT203 - re:Invent 2017
Getting Started with AWS IoT - IOT203 - re:Invent 2017
 
IOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTIOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoT
 
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...
Implementare e gestire soluzioni per l'Internet of Things (IoT) in modo rapid...
 
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
 
When IoT meets Serverless - from design to production and monitoring
When IoT meets Serverless - from design to production and monitoringWhen IoT meets Serverless - from design to production and monitoring
When IoT meets Serverless - from design to production and monitoring
 
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
.NET Fest 2019. Alex Pshul. When IoT Meets Serverless
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
 
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
 
Creating a Java Internet of Things Gateway
Creating a Java Internet of Things GatewayCreating a Java Internet of Things Gateway
Creating a Java Internet of Things Gateway
 
How to build a Citrix infrastructure on AWS
How to build a Citrix infrastructure on AWSHow to build a Citrix infrastructure on AWS
How to build a Citrix infrastructure on AWS
 
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界
 
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWS
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWSAWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWS
AWS Webcast - AWS 101 - Journey to the AWS Cloud: Introduction to AWS
 
Giga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching OverviewGiga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching Overview
 
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
(SEC309) Amazon VPC Configuration: When Least Privilege Meets the Penetration...
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
 
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
게임을 위한 Cloud Native on AWS (김일호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 

More from Amazon Web Services

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...Amazon Web Services
 
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...Amazon Web Services
 
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 FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
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 Amazon Web Services
 
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...Amazon Web Services
 
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...Amazon Web Services
 
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 WorkloadsAmazon Web Services
 
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 sfatareAmazon Web Services
 
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 NodeJSAmazon Web Services
 
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 webAmazon Web Services
 
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 sfatareAmazon 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 AWSAmazon 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 DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon 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
 

What Is Happening At The Edge

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is happening at the Edge? Danilo Poccia, Technical Evangelist @danilop
  • 2. How are IT architectures evolving?
  • 4. Client Back End Share data
 with other clients (Database) Can’t trust the client
 (Security) Need more power (compute, storage,
 network)
  • 5. Client Back End Business Logic Share data
 with other clients (Database) Can’t trust the client
 (Security) Need more power (compute, storage,
 network)
  • 6. Client Back End Latency Bandwidth Business Logic Share data
 with other clients (Database) Can’t trust the client
 (Security) Need more power (compute, storage,
 network)
  • 7. AWS Global Infrastructure Region & Number of Availability Zones New Region (coming soon)
  • 10. Amazon CloudFront Edge Infrastructure
  • 13. CDNClient Back End Devices Sensors Actuators
  • 15. CDNClient Back End Devices Sensors Actuators
  • 16. CDNClient Back End Devices Sensors Actuators Latency Bandwidth Connectivity State Provisioning Group
  • 17. CDNClient Back End Devices Sensors Actuators Gateway
  • 19. Greengrass Features Local Support for AWS Lambda Local Support for AWS IoT Devices Shadows Local Messaging Hardware Ecosystem
  • 20. CDNClient Back End Devices Sensors Actuators Gateway
  • 21. CDNClient Back End Devices Sensors Actuators Gateway Optimize Latency, Bandwidth, Connectivity, State Management, Software Provisioning
  • 22. CDNClient Back End Devices Sensors Actuators Gateway Distribute & Run Custom Logic Optimize Latency, Bandwidth, Connectivity, State Management, Software Provisioning
  • 23. CDNClient Back End Devices Sensors Actuators AWS Lambda Gateway Optimize Latency, Bandwidth, Connectivity, State Management, Software Provisioning
  • 24. CDNClient Back End Devices Sensors Actuators ++ Amazon CloudFront AWS Lambda AWS Lambda AWS Lambda AWS Greengrass Gateway
  • 25. CDNClient Back End Devices Sensors Actuators ++ Amazon CloudFront AWS Lambda AWS Lambda AWS Lambda AWS Greengrass Gateway
  • 26. Greengrass Example Functions import greengrasssdk import platform from threading import Timer import time # Creating a greengrass core sdk client client = greengrasssdk.client('iot-data') my_platform = platform.platform() def greengrass_hello_world_run(): if not my_platform: client.publish(topic=‘hello/world', payload='Hello world! Sent from Greengrass Core.') else: client.publish(topic=‘hello/world’, payload='Hello world! Sent from Greengrass Core running on platform: {}'.format(my_platform)) # Asynchronously schedule this function to be run again in 5 seconds Timer(5, greengrass_hello_world_run).start() # Execute the function above greengrass_hello_world_run() # This is a dummy handler and will not be invoked def function_handler(event, context): return Long-Lived Functions (running indefinitely)
  • 27. On-Demand Functions Greengrass Example Functions import greengrasssdk import platform import json # Creating a greengrass core sdk client client = greengrasssdk.client('iot-data') # Retrieving platform information to send from Greengrass Core my_platform = platform.platform() def function_handler(event, context): print("Received event: " + json.dumps(event, indent=2)) message = {} message['debug'] = 'I just recevied this event: {}'.format(json.dumps(event, indent=2)) if not my_platform: message['text'] = 'Hello World! Sent from Greengrass Core.' else: message['text'] = 'Hello World! Sent from Greengrass Core running on platform: {}'.format(my_platform) client.publish(topic='hello/world', payload=json.dumps(message)) return
  • 29. Greengrass Benefits Operate Offline Secure
 Communication Simplified Devices Programming Reduce the Cost of Running IoT Applications Respond to Local Events in Near Real-time
  • 30. AWS Snowball Edge 100TB + Greengrass Core (≃ EC2 m4.4xlarge instance)
  • 31. Snowball Edge Use Cases “Snowball Edge enables us to extend the innovative capabilities of HealthSuite, our cloud- enabled connected health ecosystem of devices, applications and digital tools supported by AWS, even when there is no network support.” Embedded Applications —Dale Wiggins, Business Leader, HealthSuite digital platform, Philips
  • 32. Snowball Edge Use Cases “With AWS Snowball Edge, we can now collect 100 TB of data with no intermediate steps, and we can also analyze the images immediately using the onboard compute capabilities.” Remote Locations for data collection and analysis — Bob Cowen, Director of Hatfield Marine Research Center, Oregon State University
  • 33. CDNClient Back End Devices Sensors Actuators ++ Amazon CloudFront AWS Lambda AWS Lambda AWS Lambda AWS Greengrass Gateway
  • 34. CDNClient Back End Devices Sensors Actuators ++ Amazon CloudFront AWS Lambda AWS Lambda AWS Lambda AWS Greengrass Gateway
  • 35. AWS Lambda@Edge Customize your content delivery while reducing load on your origin Events / Triggers Take serverless to your users
  • 36. Lambda@Edge Event Structure { "Records": [ { "cf": { "config": { "distributionId": "EDFDVBD6EXAMPLE" }, "request": { "clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334", "method": "GET", "uri": "/picture.jpg", "headers": { "host": [ { "key": "Host", "value": "d111111abcdef8.cloudfront.net" } ], "user-agent": [ { "key": "User-Agent", "value": "curl/7.51.0" } ] } } } } ] } { "Records": [ { "cf": { "config": { "distributionId": "EDFDVBD6EXAMPLE" }, "request": { "clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334", "method": "GET", "uri": "/picture.jpg", "headers": { "host": [ { "key": "Host", "value": "d111111abcdef8.cloudfront.net" } ], "user-agent": [ { "key": "User-Agent", "value": "curl/7.18.1" } ] } }, "response": { "status": "200", "statusDescription": "OK", "headers": { "server": [ { "key": "Server", "value": "MyCustomOrigin" } ], "set-cookie": [ { "key": "Set-Cookie", "value": "theme=light" }, { "key": "Set-Cookie", "value": "sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT" } ] } } } } ] } Request Event Response Event http://amzn.to/2hunJuA
  • 37. Creating Lambda@Edge Functions Lambda replicates the function to AWS Regions and CloudFront edge locations around the globe Replicas can't be
 edited or deleted
  • 38. Lambda@Edge Example Functions 'use strict'; exports.handler = (event, context, callback) => { /* * Generate HTTP redirect response with 302 status code and Location header. */ const response = { status: '302', statusDescription: 'Found', headers: { location: [{ key: 'Location', value: 'http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html', }], }, }; callback(null, response); }; cloudfront-http-redirect
  • 39. Lambda@Edge Example Functions 'use strict'; exports.handler = (event, context, callback) => { /* * Generate HTTP response using 200 status code with a simple body. */ const response = { status: '200', statusDescription: 'OK', headers: { vary: [{ key: 'Vary', value: '*', }], 'last-modified': [{ key: 'Last-Modified', value: '2017-01-13', }], }, body: 'Example body generated by Lambda@Edge function.', }; callback(null, response); }; cloudfront-response-generation
  • 40. Lambda@Edge Example Functions 'use strict'; exports.handler = (event, context, callback) => { const request = event.Records[0].cf.request; const headers = request.headers; if (request.uri !== '/experiment-pixel.jpg') { // do not process if this is not an A-B test request callback(null, request); return; } const cookieExperimentA = 'X-Experiment-Name=A'; const cookieExperimentB = 'X-Experiment-Name=B'; const pathExperimentA = '/experiment-group/control-pixel.jpg'; const pathExperimentB = '/experiment-group/treatment-pixel.jpg'; let experimentUri; if (headers.cookie) { for (let i = 0; i < headers.cookie.length; i++) { if (headers.cookie[i].value.indexOf(cookieExperimentA) >= 0) { console.log('Experiment A cookie found'); experimentUri = pathExperimentA; break; } else if (headers.cookie[i].value.indexOf(cookieExperimentB) >= 0) { console.log('Experiment B cookie found'); experimentUri = pathExperimentB; break; } } } if (!experimentUri) { console.log('Experiment cookie has not been found. Throwing dice...'); if (Math.random() < 0.75) { experimentUri = pathExperimentA; } else { experimentUri = pathExperimentB; } } request.uri = experimentUri; console.log(`Request uri set to "${request.uri}"`); callback(null, request); }; A/B Testing http://amzn.to/2hoarw4
  • 42. Lambda@Edge Benefits Global Continuous Scaling Reduce Origin Load Subsecond Metering
  • 43. Lambda@Edge Use Cases URL Rewrites Access Control at the Edge
  • 44. Lambda@Edge Use Cases URL Rewrites Access Control at the Edge Response Generation At Viewer Request Remote Network Calls
  • 45. Lambda@Edge Use Cases URL Rewrites Access Control at the Edge Response Generation At Viewer Request Remote Network Calls A/B Testing Highly Personalized Websites
  • 46. Lambda@Edge Use Cases Demo build of a CloudFront+S3 distribution, using Lambda@Edge to secure its HTTP headers
  • 47. CDNClient Back End Devices Sensors Actuators ++ Amazon CloudFront AWS Lambda AWS Lambda AWS Lambda AWS Greengrass Gateway
  • 48. CDNClient Back End Devices Sensors Actuators AWS Lambda Gateway
  • 49. Optimize your IT Architectures at the Edge Push Business Logic Closer to Users & Devices Use the Same Serverless Programming Model Create a Better User Experience for Your Customers
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You @danilop