Mais conteúdo relacionado
Semelhante a 20200513 - CloudComputing UCU (20)
Mais de Marcia Villalba (16)
20200513 - CloudComputing UCU
- 1. © 2020, Amazon Web Services, Inc. or its Affiliates.
Marcia Villalba
Developer Advocate AWS
@mavi888uy
Hablemos de Serverles? 🤷
- 2. © 2020, Amazon Web Services, Inc. or its Affiliates.
About me
AWS Developer Advocate
Estudie en la UCU – Ingenieria de
sistemas
Aalto University – Master of science
Coding for more than 15 years
Host of FooBar YouTube Channel
https://youtube.com/foobar_codes
- 3. © 2020, Amazon Web Services, Inc. or its Affiliates.
Table of contents
• Razones para usar la nube
• Serverless
• Inteligencia artificial
- 4. © 2020, Amazon Web Services, Inc. or its Affiliates.
Millones de clientes activos por mes
- 5. © 2020, Amazon Web Services, Inc. or its Affiliates.
Muchos clientes … muchisimos
- 6. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
- 7. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 8. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 9. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 10. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 11. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 12. © 2020, Amazon Web Services, Inc. or its Affiliates.
Algunos conocidos…
https://d21tktytfo9riy.cloudfront.net/wp-
content/uploads/2016/03/30123842/abc
om-default-share.jpg
- 13. © 2020, Amazon Web Services, Inc. or its Affiliates.
Cuáles son los beneficios de la nube?
- 14. © 2020, Amazon Web Services, Inc. or its Affiliates.
Trade capital expense for variable expense
Data center investment
based upon forecast
Capital
Pay only for the amount
you consume
- 15. © 2020, Amazon Web Services, Inc. or its Affiliates.
Massive economies of scale
Because of aggregate usage from all customers, AWS can achieve
higher economies of scale and pass savings on to customers
Economies of scale
Savings
- 16. © 2020, Amazon Web Services, Inc. or its Affiliates.
Stop guessing capacity
Overestimated
server capacity
Underestimated
server capacity
Scaling on
demand
- 17. © 2020, Amazon Web Services, Inc. or its Affiliates.
Increase speed and agility
Weeks between wanting
resources and having resources
Minutes between wanting
resources and having resources
Launch
- 18. © 2020, Amazon Web Services, Inc. or its Affiliates.
Stop spending money on
running and maintaining datacenters
Running datacenters Business and customers
Investment
- 19. © 2020, Amazon Web Services, Inc. or its Affiliates.
Go global in minutes
- 20. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS security
Keep your data safe
Meet compliance requirements
Save money
Scale quickly and securely
- 21. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS global infrastructure
- 22. © 2020, Amazon Web Services, Inc. or its Affiliates.
Regions
# AWS Regions
Availability Zones
Planned Regions
#
- 23. © 2020, Amazon Web Services, Inc. or its Affiliates.
Availability Zones
# AWS Regions
Availability Zones
Planned Regions
#
- 24. © 2020, Amazon Web Services, Inc. or its Affiliates.
Availability Zones
eu-west-1
(Ireland)
eu-west-1a eu-west-1b
eu-west-1c
datacenter(s)
datacenter(s)
datacenter(s)
- 25. © 2020, Amazon Web Services, Inc. or its Affiliates.
Selecting a region
Determine the right region for
your services, applications, and
data based on these factors
Proximity to customers
(latency)
Data governance,
legal requirements
Services available
within the region
Costs (vary by region)
- 26. © 2020, Amazon Web Services, Inc. or its Affiliates.
Edge locations: Reaching distant customers
Edge locations
Multiple edge locations
Regional edge caches
- 27. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS management interfaces
- 28. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Management Console
Easy-to-use graphical interface
Command Line Interface (AWS CLI)
Access to services by discrete command
Software Development Kits (SDKs)
Access services in your code
Three ways to interact with AWS
- 29. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Management Console
- 30. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS CLI
~aws
• Open source tool for
interacting with AWS services
• Environments
• Linux
• MacOS
• Windows
- 31. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS SDKs
JavaScript
Python
PHP
.NET
Ruby
Go
Node.js
C++
Java
IoT
- 32. © 2020, Amazon Web Services, Inc. or its Affiliates.
Empezando con AWS
- 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monolith
Does everything
Monoliths are OK
- 34. © 2020, Amazon Web Services, Inc. or its Affiliates.
Easiest way to get started
Create larger
instances
Add attached
block storage
Load balance
your application
Connect to
AWS services
Networking &
data transfer
DNS
management
One static
IP/instance
Computing
power
AWS Lightsail
- 35. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Elastic Beanstalk
DeployConfigure & Provision Monitor & Manage
- 36. © 2020, Amazon Web Services, Inc. or its Affiliates.
Elastic Beanstalk supports
the most popular runtimes
for web applications, as well
as Docker images
Elastic Beanstalk also
supports custom platforms
and custom images
AWS Elastic Beanstalk - Runtime support
- 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices
Does one thing
Microservices
- 38. © 2020, Amazon Web Services, Inc. or its Affiliates.
Building Your API on AWS
Amazon
Cognito
Web
Amazon Simple
Storage Service (S3)Amazon
API
Gateway
Services
AWS
Lambda
Any AWS
Service
Mobile
AWS
Fargate
- 39. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amazon
CloudFront
Mobile
Web
Amazon
AuroraAWS
AppSync
Amazon Simple
Storage Service (S3)
Mobile
Amazon
Cognito
Amazon
DynamoDB
Amazon
Elasticsearch Service
AWS
Lambda
AWS Amplify
- 40. © 2020, Amazon Web Services, Inc. or its Affiliates.
Static / Single Page Web
- 41. © 2020, Amazon Web Services, Inc. or its Affiliates.
Containers
Amazon Elastic
Container Service
Amazon EC2
Container Registry
AWS Elastic
Beanstalk
Amazon Elastic Container
Service for Kubernetes
AWS Fargate
AWS App
Mesh
- 42. © 2020, Amazon Web Services, Inc. or its Affiliates.
Analytics
Mobile
Web
Amazon Kinesis Amazon Kinesis
Data Firehose
Amazon Simple
Storage Service
(S3)
AWS LambdaAmazon Pinpoint
Amazon Kinesis
Data Analytics
Amazon
Elasticsearch Service
Amazon
CloudWatch Alarm
Amazon API
Gateway
Amazon
CloudFront
Amazon
Athena
Amazon
QuickSight
- 43. © 2020, Amazon Web Services, Inc. or its Affiliates.
Comparison of operational responsibility
AWS Lambda
Serverless functions
AWS Fargate
Serverless containers
ECS/EKS
Container-management as a service
EC2
Infrastructure-as-a-Service
More opinionated
Less opinionated
AWS manages Customer manages
• Data source integrations
• Physical hardware, software, networking,
and facilities
• Provisioning
• Application code
• Container orchestration, provisioning
• Cluster scaling
• Physical hardware, host OS/kernel,
networking, and facilities
• Application code
• Data source integrations
• Security config and updates, network config,
management tasks
• Container orchestration control plane
• Physical hardware software,
networking, and facilities
• Application code
• Data source integrations
• Work clusters
• Security config and updates, network config,
firewall, management tasks
• Physical hardware software,
networking, and facilities
• Application code
• Data source integrations
• Scaling
• Security config and updates, network config,
management tasks
• Provisioning, managing scaling and
patching of servers
- 44. © 2020, Amazon Web Services, Inc. or its Affiliates.
Relational
Referential
integrity, ACID
transactions,
schema-
on-write
Lift and shift, ERP,
CRM, finance
Aurora, RDS
Key-value
High
throughput,
low-latency
reads
and writes,
endless scale
Real-time
bidding, shopping
cart, social,
product catalog,
customer
preferences
DynamoDB
Document
Store
documents and
quickly access
querying on
any attribute
Content
management,
personalization,
mobile
DocumentDB
In-memory
Query by key
with
microsecond
latency
Leaderboards,
real-time
analytics, caching
ElastiCache
Graph
Quickly and
easily create
and navigate
relationships
between
data
Fraud detection,
social
networking,
recommendation
engine
Neptune
Time-series
Collect, store,
and process
data
sequenced
by time
IoT applications,
event tracking
Timestream
Ledger
Complete,
immutable, and
verifiable history
of all changes to
application data
Systems
of record, supply
chain, health care,
registrations,
financial
QLDB
AWS
Service(s)
Common Use
Cases
Data Model and Store
- 46. © 2020, Amazon Web Services, Inc. or its Affiliates.
Levelofabstraction
Focus on business logic
Physical machines Requires “guess” planning
Lives for years on-premises
Heavy investments (CAPEX)
Low innovation factor
Deploy in months
Computing evolution: A paradigm shift
- 47. © 2020, Amazon Web Services, Inc. or its Affiliates.
Levelofabstraction
Focus on business logic
Virtual machines
Hardware independence
Faster provisioning speed (minutes/hours)
Trade CAPEX for OPEX
More scale
Elastic resources
Faster speed and agility
Reduced maintenance
Computing evolution: A paradigm shift
- 48. © 2020, Amazon Web Services, Inc. or its Affiliates.
Levelofabstraction
Focus on business logic
Containerization
Platform independence
Consistent runtime environment
Higher resource utilization
Easier and faster deployments
Isolation and sandboxing
Start speed (deploy in seconds)
Computing evolution: A paradigm shift
- 49. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Lambda
AWS Fargate
Levelofabstraction
Focus on business logic
Continuous scaling
Fault tolerance built in
Event-driven
Pay for value
Zero maintenance
Serverless
Computing evolution: A paradigm shift
- 50. © 2020, Amazon Web Services, Inc. or its Affiliates.
What it means that something is serverless?
No managing infrastructure High availability built in
Pay for what you useScales automagically
- 51. © 2020, Amazon Web Services, Inc. or its Affiliates.
Function as a Service (FaaS)
“AWS Lambda lets you run code without
provisioning or managing servers. ...
…Just upload your code and Lambda takes care
of everything required to run and scale your code
with high availability.
You can set up your code to automatically
trigger from other AWS services or call it directly
from any web or mobile app”
AWS – Lambda definition
AWS
Lambda
- 52. © 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How AWS Lambda works?
Event source Function Services
Node.js
Python
Java
C#
Go
Custom runtimes
Changes in
data state
Requests to
endpoints
Changes in
resource state
Amazon S3
DynamoDB
Amazon
SQS
- 53. © 2020, Amazon Web Services, Inc. or its Affiliates.
Managed services
Amazon S3
Amazon SQS
DynamoDB
- 54. © 2020, Amazon Web Services, Inc. or its Affiliates.
Let’s build something
- 55. © 2020, Amazon Web Services, Inc. or its Affiliates.
The simplest serverless example
Amazon API Gateway AWS Lambda Amazon DynamoDB
Client
- 56. © 2020, Amazon Web Services, Inc. or its Affiliates.
API Gateway
- Helps to create, maintain, monitor
and secure APIs at scale.
- REST APIs
- WebSockets APIs
Amazon API Gateway
- 57. © 2020, Amazon Web Services, Inc. or its Affiliates.
DynamoDB
- Dynamo is a key-value database
service
- Fully managed
- Super performant – 20 million
request per second
Amazon
DynamoDB
- 60. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Amplify recap
Broad support for the most popular OS
platforms and frameworks
Developer tools for building, testing,
deploying, and hosting the entire app –
frontend and backend
The Amplify Framework, an open-source
client framework, includes libraries, a CLI
toolchain, and UI components
The CLI toolchain enables easy integration with
AWS services, such as Amazon Cognito, AWS
AppSync, and Amazon Pinpoint
- 61. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amplify Framework review
• Open source
• Among the top 5 fastest growing projects on GitHub
• Opinionated
• Best practices built-in
• Infrastructure as code
• Categories-based high-level abstractions
- 62. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amplify Framework review: Categories
Analytics
Track user sessions, custom
user attributes, and in-app
metrics
API
HTTP requests using REST
and GraphQL with support
for real-time data
Auth
AuthN + AuthZ library with
prebuilt UI components for
your app
DataStore
On-device persistent storage
that automatically
synchronizes data between
your apps and the cloud
Interactions
Conversational bots
powered by deep learning
technologies
PubSub
Connect your app to
message-oriented
middleware on the cloud
Notifications
Push notifications with
campaign analytics and
targeting
XR
Work with augmented
reality and virtual reality
content in your apps
Predictions
Add AI/ML capabilities to
your app, powered by cloud
services
Storage
Securely manage user
content in public, protected,
and private storage
- 63. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amplify Framework review: CLI
- 64. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amplify Framework recap: Libraries
- 65. © 2020, Amazon Web Services, Inc. or its Affiliates.
Get the code
https://github.com/mavi888/amplify-appsync-predictions-demo-base
- 68. © 2020, Amazon Web Services, Inc. or its Affiliates.
/posts /comments /authors
REST API
posts comments authors
GraphQL API
What is GraphQL?
- 69. © 2020, Amazon Web Services, Inc. or its Affiliates.
Queries MutationsTypes
Subscriptions
GraphQL schema and operations
type User {
id: ID!
username: String!
firstName: String
lastName: String
daysActive: Int
}
A query language for APIs… and a runtime!
- 70. © 2020, Amazon Web Services, Inc. or its Affiliates.
A query language for APIs . . .
Queries
query GetPost {
getPost(id: ”1”) {
id
title
}
}
mutation CreatePost {
createPost(title: “Summit”) {
id
title
}
}
subscription OnCreatePost {
onCreatePost {
id
title
}
}
Mutations Subscriptions
- 71. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
SQL datasource
1.
Create the schema.
Describe all the available types and
operations
- 72. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
2.
Define all your resolvers, to be able
to serve all the operations defined in
the schema
SQL datasource
- 73. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
3.
The client makes a request
SQL datasource
- 74. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
4.
GraphQL uses the request resolver to
translate the client query and get
data from the datasource Translate GraphQL query into
SELECT video_id, video_name FROM videos
SQL datasource
- 75. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
5.
GraphQL uses the response resolver
to return data from the datasource
to the client
In this case the resolver will
translate SQL into JSON
SQL datasource
- 76. © 2020, Amazon Web Services, Inc. or its Affiliates.
How GraphQL works?
Client
GraphQL
6.
GraphQL returns the JSON response
to the client
SQL datasource
- 78. © 2020, Amazon Web Services, Inc. or its Affiliates.
AWS AppSync
Managed serverless
GraphQL service
Connect to data
sources in your account
Add data sync, real-time, and
offline capabilities for any data
source or API
GraphQL facade for any
AWS service
Conflict detection and
resolution in the cloud
Enterprise security features:
AWS Identity and Access
Management (IAM), Amazon
Cognito, OIDC, API keys
- 79. © 2020, Amazon Web Services, Inc. or its Affiliates.
GraphQL Transform: Mix and match data sources
type Post {
id: ID!
content: String
description: String
ups: Int
downs: Int
}
- 80. © 2020, Amazon Web Services, Inc. or its Affiliates.
GraphQL Transform: Mix and match data sources
type Post
@model {
id: ID!
content: String
description: String
ups: Int
downs: Int
}
createPost
readPost
updatePost
deletePost
list
- 81. © 2020, Amazon Web Services, Inc. or its Affiliates.
GraphQL Transform: Mix and match data sources
type Post
@model {
id: ID!
content: String
description: String
ups: Int
downs: Int
}
createPost
readPost
updatePost
deletePost
list
Mutations
Queries
- 82. © 2020, Amazon Web Services, Inc. or its Affiliates.
GraphQL Transform: Mix and match data sources
Mutations
Queries
type Post
@model
@auth(rules: [{allow: owner}]){
id: ID!
content: String
description: String
ups: Int
downs: Int
}
createPost
readPost
updatePost
deletePost
list
- 83. © 2020, Amazon Web Services, Inc. or its Affiliates.
GraphQL Transform: Mix and match data sources
searchPosts
Mutations
Queries
type Post
@model
@auth(rules: [{allow: owner}])
@searchable{
id: ID!
content: String
description: String
ups: Int
downs: Int
}
createPost
readPost
updatePost
deletePost
list
Amazon Elasticsearch
Service
- 86. © 2020, Amazon Web Services, Inc. or its Affiliates.
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
The Amazon ML Stack: Broadest & Deepest Set of Capabilities
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
Models without training data (REINFORCEMENT LEARNING)
Algorithms & models ( A W S M A R K E T P L A C E )
Language Forecasting Recommendations
NEW NEWNEW
NEW
NEW
NEWNEW
NEW
NEW
- 87. © 2020, Amazon Web Services, Inc. or its Affiliates.
Put AI to work for your business
Pre-trained AI services that require
no ML skills or training
Easily add intelligence to your
existing apps and workflows
Quality and accuracy from
continuously-learning APIs
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
- 88. © 2020, Amazon Web Services, Inc. or its Affiliates.
Amazon Comprehend – NLP – natural language processing
- 89. © 2020, Amazon Web Services, Inc. or its Affiliates.
54 languages
2,804 combinations
Real time
<500 ms / sentence on average
<150 ms / conversational / short form
Tag handling
XML tags placement maintains styling
and formatting through translation
< / >
Data security
Data ownership
Encryption
Access management
Ease of use
Simple API calls and partner solutions
$15/1M characters
Or $0.000075 per word; pay as you go;
2M characters monthly on free tier
Amazon Translate
Key features
HIPPA-eligible
Enables use in medical environments
- 91. © 2020, Amazon Web Services, Inc. or its Affiliates.
Get the code
https://github.com/mavi888/amplify-appsync-predictions-demo-base
- 92. © 2020, Amazon Web Services, Inc. or its Affiliates.
How to learn AWS?
- 93. © 2020, Amazon Web Services, Inc. or its Affiliates.
Study for a certification
- 94. © 2020, Amazon Web Services, Inc. or its Affiliates.
“If you want to
increase innovation,
you have to
lower the cost of failure”
Joi Ito
Director, MIT Media Lab
- 95. © 2020, Amazon Web Services, Inc. or its Affiliates.
Minimize Risks
Is it a one-way or
a two-way door?
- 96. © 2020, Amazon Web Services, Inc. or its Affiliates.
Fail Fast
Amazon’s first smartphone, the Fire Phone, hasn’t
been discontinued, but it’s been a pretty big flop so
far. Amazon wrote off $170 million worth of unsold
Fire phones last year, and its hardware division has
been cutting jobs recently.
Amazon once had an auction site called Amazon,
which went head-to-head with eBay. Auction shut
down eventually, but it helped Amazon launch its
own online marketplace for third party vendors
called Amazon Marketplace, which is now a big part
of its overall business.
- 97. © 2020, Amazon Web Services, Inc. or its Affiliates.
“If you can’t feed a
team with two
pizzas, it’s too
large”
- Jeff Bezos
Small & Agile Teams
- 98. © 2020, Amazon Web Services, Inc. or its Affiliates.
Ownership
“You build it, you run it. This brings
developers into contact with the
day-to-day operation of their software.
It also brings them into day-to-day
contact with the customer.“
@Werner, CTO
- 99. © 2020, Amazon Web Services, Inc. or its Affiliates.
Preguntas!
Marcia Villalba
Developer Advocate AWS
Twitter: @mavi888uy
YouTube: https://youtube.com/foobar_codes