© 2019, Amazon Web Services, Inc. or its Affiliates.
AI Services and Serverless Workshop
Boaz Ziniman, Technical Evangelist
Amazon Web Services
@ziniman
ziniman
SSID: Guest
Password: Unfabric@@2020
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
• Overview of Serverless computing and AI Services
• Introduction to AWS services used in the workshop
• Outline of the workshop scenario
• Preview of the labs
What to expect from this session
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Serverless Computing
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
In the beginning…
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
• Procurement
• Power
• Cooling
• Asset tracking
• Remote hands
• IP transit
• Colocation
• Capacity planning
• Hardware refreshes
• Storage
• Depreciation
• Physical security
• Networking equipment
• Cabling
Physical hardware – concern space
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
• Allows developers to obtain compute
capacity on-demand
• Create virtual servers in the cloud with the
click of a button
• Launched in 2006
Amazon Elastic Compute Cloud (EC2)
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Amazon Elastic Compute Cloud (EC2)
Elasticity
Provision Servers in
Minutes
Infrastructure as
Code
Programmatic Networking
Global Footprint
Match Capacity and
Demand
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
• Configuration management
• Security patches
• Server utilization
• Operating systems
• Auto-scaling policies
• Monitoring
• Intrusion detection
• Resiliency
• Machine images
• Access management
• Capacity planning
• Hourly billing
• Code deployment
Servers – concern space
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Serverless computing
Fully managed
• No provisioning
• No system administration
• No security patches
• Fault tolerant
Developer productivity
• Focus on your application
• Experiment and innovate quickly
Continuous scaling
• Scale up and down with
demand
• Never pay for idle resources
Build and run applications and services without thinking of servers
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Step Functions
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Application Lifecycle in AWS Step Functions
Visualize in the
Console
Define in JSON Monitor
Executions
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Step Functions Tasks – Service Integrations
AWS Lambda invoke a Lambda function
AWS Batch submit a Batch job and wait for it to complete
Amazon DynamoDB get, put, update or delete an item
Amazon ECS/Fargate run an ECS task and waits for it to complete
Amazon SNS publish a message to a SNS topic
Amazon SQS send a SQS message
AWS Glue start a Glue job
Amazon SageMaker create a training or transform job
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
AI Services
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Our mission at AWS
Put machine learning in the hands
of every developer
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
M L F R A M E W O R K S &
I N F R A S T R U C T U R E
A I S E R V I C E S
R E K O G N I T I O N
I M A G E
P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D
& C O M P R E H E N D
M E D I C A L
L E XR E K O G N I T I O N
V I D E O
Vision Speech Chatbots
A M A Z O N
S A G E M A K E R
B U I L D T R A I N
F O R E C A S TT E X T R A C T P E R S O N A L I Z E
D E P L O Y
Pre-built algorithms & notebooks
Data labeling (G R O U N D T R U T H )
One-click model training & tuning
Optimization (N E O )
One-click deployment & hosting
M L S E R V I C E S
F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e
E C 2 P 3
& P 3 d n
E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C
I N F E R E N C E
Reinforcement learningAlgorithms & models ( A W S M A R K E T P L A C E
F O R M A C H I N E L E A R N I N G )
Language Forecasting Recommendations
The Amazon ML stack:
Broadest & deepest set of capabilities
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
A I S E R V I C E S
R E K O G N I T I O N
I M A G E
P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D
& C O M P R E H E N D
M E D I C A L
L E XR E K O G N I T I O N
V I D E O
Vision Speech Chatbots
F O R E C A S TT E X T R A C T P E R S O N A L I Z E
Language Forecasting Recommendations
Put AI to work for your business
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Amazon Rekognition
Easily add intelligent image and video analysis
to your applications.
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Amazon Rekognition:
Deep Learning-Based Image and Video Analysis
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Amazon Rekognition Benefits
Low cost
Your data
is your ownServerless
Rapid
integration
State of the
art capabilities
Continuous
improvement
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Amazon Rekognition Image
Object and scene
detection
Facial
analysis
Face
recognition
Text in
image
Unsafe image
detection
Celebrity
recognition
Face comparison
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Object & Scene Detection
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Smiling?
Facial Analysis
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Crowd Detection – up to 100 faces
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Facial Search
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Explicit Nudity
Nudity
Graphic Male Nudity
Graphic Female Nudity
Sexual Activity
Partial Nudity
Suggestive
Female Swimwear or Underwear
Male Swimwear or Underwear
Revealing Clothes
Image Moderation
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Celebrity Recognition
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Text in Image
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
boazz: ~/ aws rekognition detect-labels
--image '{"S3Object":{"Bucket":"demos.ziniman.com","Name":"photos/reko.jpg"}}’
{
"Labels": [
{
"Confidence": 99.14048767089844,
"Name": "Human"
},
{
"Confidence": 99.1404800415039,
"Name": "People"
},
{
"Confidence": 99.14048767089844,
"Name": "Person"
}……
Rekognition API Example
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
boazz: ~/ aws rekognition detect-faces
--image '{"S3Object":{"Bucket":"demos.ziniman.com","Name":"photos/reko.jpg"}}'
--attributes "ALL”
{
"FaceDetails": [
{
....
"Gender": {
"Confidence": 99.9211654663086,
"Value": "Male"
},
"AgeRange": {
"High": 52,
"Low": 35
},
....
Rekognition API Example
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Rekognition Lambda Python Example
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
The Workshop
Image Recognition and Processing Backend
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
What we are going to build?
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
What we are going to build?
AWS LambdaAmazon DynamoDB
Amazon S3
AWS Step
Functions
Amazon Rekognition
AWS Lambda
Start state
machine
execution
AWS Lambda
AWS Lambda
AWS Lambda
Extract and
validate image
metadata
from S3 object
(EXIF, size,
format, etc.)
Generate
image
thumbnail
Invoke
Rekognition API
Store data in
DynamoDB
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
Step by Step
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
• Go to: https://bit.ly/ServerlessAI
• User accounts
• Your own account
• Be careful with production/your company/shared/etc. accounts
• Make sure all services are available in the region you are running in
• WiFi
• We are here to help
• Cleanup
Let the Fun Begin!
© 2019, Amazon Web Services, Inc. or its Affiliates.
Thank You!
Boaz Ziniman, Technical Evangelist
Amazon Web Services
@ziniman
ziniman
© 2019, Amazon Web Services, Inc. or its Affiliates.
@ziniman
https://bit.ly/ServerlessAI
SSID: Guest
Password: Unfabric@@2020

AI Services and Serverless Workshop

  • 1.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. AI Services and Serverless Workshop Boaz Ziniman, Technical Evangelist Amazon Web Services @ziniman ziniman SSID: Guest Password: Unfabric@@2020
  • 2.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman • Overview of Serverless computing and AI Services • Introduction to AWS services used in the workshop • Outline of the workshop scenario • Preview of the labs What to expect from this session
  • 3.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Serverless Computing
  • 4.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman In the beginning…
  • 5.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman • Procurement • Power • Cooling • Asset tracking • Remote hands • IP transit • Colocation • Capacity planning • Hardware refreshes • Storage • Depreciation • Physical security • Networking equipment • Cabling Physical hardware – concern space
  • 6.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman • Allows developers to obtain compute capacity on-demand • Create virtual servers in the cloud with the click of a button • Launched in 2006 Amazon Elastic Compute Cloud (EC2)
  • 7.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Amazon Elastic Compute Cloud (EC2) Elasticity Provision Servers in Minutes Infrastructure as Code Programmatic Networking Global Footprint Match Capacity and Demand
  • 8.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman • Configuration management • Security patches • Server utilization • Operating systems • Auto-scaling policies • Monitoring • Intrusion detection • Resiliency • Machine images • Access management • Capacity planning • Hourly billing • Code deployment Servers – concern space
  • 9.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Serverless computing Fully managed • No provisioning • No system administration • No security patches • Fault tolerant Developer productivity • Focus on your application • Experiment and innovate quickly Continuous scaling • Scale up and down with demand • Never pay for idle resources Build and run applications and services without thinking of servers
  • 10.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Step Functions
  • 11.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Application Lifecycle in AWS Step Functions Visualize in the Console Define in JSON Monitor Executions
  • 12.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Step Functions Tasks – Service Integrations AWS Lambda invoke a Lambda function AWS Batch submit a Batch job and wait for it to complete Amazon DynamoDB get, put, update or delete an item Amazon ECS/Fargate run an ECS task and waits for it to complete Amazon SNS publish a message to a SNS topic Amazon SQS send a SQS message AWS Glue start a Glue job Amazon SageMaker create a training or transform job
  • 13.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman AI Services
  • 14.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Our mission at AWS Put machine learning in the hands of every developer
  • 15.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman M L F R A M E W O R K S & I N F R A S T R U C T U R E A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D & C O M P R E H E N D M E D I C A L L E XR E K O G N I T I O N V I D E O Vision Speech Chatbots A M A Z O N S A G E M A K E R B U I L D T R A I N F O R E C A S TT E X T R A C T P E R S O N A L I Z E D E P L O Y Pre-built algorithms & notebooks Data labeling (G R O U N D T R U T H ) One-click model training & tuning Optimization (N E O ) One-click deployment & hosting M L S E R V I C E S F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e E C 2 P 3 & P 3 d n E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Reinforcement learningAlgorithms & models ( A W S M A R K E T P L A C E F O R M A C H I N E L E A R N I N G ) Language Forecasting Recommendations The Amazon ML stack: Broadest & deepest set of capabilities
  • 16.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D & C O M P R E H E N D M E D I C A L L E XR E K O G N I T I O N V I D E O Vision Speech Chatbots F O R E C A S TT E X T R A C T P E R S O N A L I Z E Language Forecasting Recommendations Put AI to work for your business
  • 17.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Amazon Rekognition Easily add intelligent image and video analysis to your applications.
  • 18.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Amazon Rekognition: Deep Learning-Based Image and Video Analysis
  • 19.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Amazon Rekognition Benefits Low cost Your data is your ownServerless Rapid integration State of the art capabilities Continuous improvement
  • 20.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Amazon Rekognition Image Object and scene detection Facial analysis Face recognition Text in image Unsafe image detection Celebrity recognition Face comparison
  • 21.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Object & Scene Detection
  • 22.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Smiling? Facial Analysis
  • 23.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Crowd Detection – up to 100 faces
  • 24.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Facial Search
  • 25.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Explicit Nudity Nudity Graphic Male Nudity Graphic Female Nudity Sexual Activity Partial Nudity Suggestive Female Swimwear or Underwear Male Swimwear or Underwear Revealing Clothes Image Moderation
  • 26.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Celebrity Recognition
  • 27.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Text in Image
  • 28.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman boazz: ~/ aws rekognition detect-labels --image '{"S3Object":{"Bucket":"demos.ziniman.com","Name":"photos/reko.jpg"}}’ { "Labels": [ { "Confidence": 99.14048767089844, "Name": "Human" }, { "Confidence": 99.1404800415039, "Name": "People" }, { "Confidence": 99.14048767089844, "Name": "Person" }…… Rekognition API Example
  • 29.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman boazz: ~/ aws rekognition detect-faces --image '{"S3Object":{"Bucket":"demos.ziniman.com","Name":"photos/reko.jpg"}}' --attributes "ALL” { "FaceDetails": [ { .... "Gender": { "Confidence": 99.9211654663086, "Value": "Male" }, "AgeRange": { "High": 52, "Low": 35 }, .... Rekognition API Example
  • 30.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Rekognition Lambda Python Example
  • 31.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman The Workshop Image Recognition and Processing Backend
  • 32.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman What we are going to build?
  • 33.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman What we are going to build? AWS LambdaAmazon DynamoDB Amazon S3 AWS Step Functions Amazon Rekognition AWS Lambda Start state machine execution AWS Lambda AWS Lambda AWS Lambda Extract and validate image metadata from S3 object (EXIF, size, format, etc.) Generate image thumbnail Invoke Rekognition API Store data in DynamoDB
  • 34.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman Step by Step
  • 35.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman • Go to: https://bit.ly/ServerlessAI • User accounts • Your own account • Be careful with production/your company/shared/etc. accounts • Make sure all services are available in the region you are running in • WiFi • We are here to help • Cleanup Let the Fun Begin!
  • 36.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. Thank You! Boaz Ziniman, Technical Evangelist Amazon Web Services @ziniman ziniman
  • 37.
    © 2019, AmazonWeb Services, Inc. or its Affiliates. @ziniman https://bit.ly/ServerlessAI SSID: Guest Password: Unfabric@@2020