Contenu connexe Similaire à Getting Started with Microservices, Containers, and Serverless Architectures (20) Plus de Amazon Web Services (20) Getting Started with Microservices, Containers, and Serverless Architectures1. P U B L I C S E C T O R
S U M M I T
NEW DELHI
2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Getting Started with Microservices,
Containers, and Serverless Architectures
Mandar Patil
Solutions Architect
AISPL
Vikas Tiwari
Solutions Architect
AISPL
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Agenda
Microservices architectural patterns
Microservices operational model & development lifecycle
Serverless architectural patterns
Serverless best practices
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Development transformation at Amazon:
2001–2002
Monolithic application
+ teams
2001
Lesson learned: Decompose for agility
2002
Microservices +
two pizza teams
5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Full ownership
Full accountability
“DevOps”
Focused innovation
Two pizza teams
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
What changes
have to be made
in this new world?
Architectural patterns
Operational model
Software delivery
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
When the impact of change is small,
release velocity can increase
Monolith
Does everything
Microservices
Does one thing
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
MICROSERVICE
API
API
MICROSERVICE
MICROSERVICE
EVENT
API
MICROSERVICE
EVENT
API
MICROSERVICE
APPLICATION
Mobile client
Client
IoT
PERSISTENCE PERSISTENCE
Microservices architectures
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Mobile apps
Websites
Services
Internet Amazon
CloudFront
Amazon CloudWatch
monitoring
Amazon
API
Gateway
cache
Any other
AWS service
All publicly
accessible
endpoints
AWS
Lambda
functions
Endpoints
in your
Amazon
VPC
Regional API Endpoints
AWS Lambda
functions
Endpoints on
Amazon EC2
Your VPCAWS
Manage APIs with Amazon API Gateway
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Decouple state from code using messaging
Queues
Simple
Fully-managed
Any volume
Pub/sub
Simple
Fully-managed
Flexible
Amazon Simple
Queue Service
(Amazon SQS)
Amazon Simple
Notification Service
(Amazon SNS)
Messaging
Synchronization
Rapid
Fully-managed
Real-time
Amazon
CloudWatch
Events
14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
And data streams
Ingest
Data streams
Data processing
Real-time
Data Store
Microservices
Performance at scale
Fast and Flexible
Amazon Kinesis
Data Streams
Amazon
DynamoDB
Data Stream Capture
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Track status of data
and execution
Remove
redundant code
Build workflows to orchestrate everything
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Cloud-native architectures are small
pieces, loosely joined
17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Isn’t all of this very hard now that
we have lots of pieces to operate?
19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AWS operational responsibility models
On Premises Cloud
Less More
Compute Virtual Machine
Amazon EC2 AWS Elastic Beanstalk AWS LambdaAWS Fargate
Databases MySQL MySQL on Amazon EC2
Amazon RDS MySQL Amazon RDS Aurora Aurora Serverless DynamoDB
Storage Storage
Amazon S3
Messaging ESBs
Amazon MQ Kinesis Amazon SQS/Amazon SNS
Analytics
Hadoop Hadoop on Amazon EC2 Amazon EMR Amazon Elasticsearch Service (Amazon ES) Athena
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
How do I develop and deploy code in a
serverless microservices architecture?
22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Monolith development lifecycle
developers
delivery pipelines
services
monitorreleasetestbuild
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Microservice development lifecycle
developers services
monitorreleasetestbuild
delivery pipelines
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Best practices
Automate everything
Decompose for agility
(microservices, two pizza teams)
Standardized tools
Infrastructure as code
Belts and suspenders
(governance, templates)
25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AWS Developer Tools for CI/CD
AWS CodeBuild +
Third Party
AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS X-Ray
Source Build Test Deploy Monitor
AWS CodePipeline
26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
What is serverless?
No infrastructure provisioning,
no management
Auto scaling
Pay for value Highly available and secure
28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AWS
Lambda
AWS
Fargate
Amazon
API Gateway
Amazon
SNS
Amazon
SQS
AWS
Step Functions
COMPUTE
DATA STORES
INTEGRATION
Amazon Aurora
Serverless
Amazon
S3
Amazon
DynamoDB
AWS
AppSync
29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Serverless compute engine
for containers
Long-running
Bring existing code
Fully-managed orchestration
AWS Fargate
Let’s focus on compute for now
Serverless event-driven
code execution
Short-lived
All language runtimes
Data source integrations
AWS Lambda
30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Comparison of operational responsibility
AWS Lambda
Serverless functions
AWS Fargate
Serverless containers
Amazon ECS/
Amazon EKS
Container-management as a service
Amazon 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 AWS Config and updates, network
config, and management tasks
• Container orchestration control plane
• Physical hardware software,
networking, and facilities
• Application code
• Data source integrations
• Work clusters
• Security AWS Config and updates, network
config, firewall, and management tasks
• Physical hardware software,
networking, and facilities
• Application code
• Data source integrations
• Scaling
• Security config and updates, network config,
and management tasks
• Provisioning, managing scaling, and
patching of servers
31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Web application
Data stored in
Amazon
DynamoDB
Dynamic content in
AWS Lambda
Amazon API
Gateway
Browser
Amazon
CloudFront
Amazon S3
Amazon Cognito
33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Web application
Data stored in
Amazon
DynamoDB
Dynamic content in
AWS Lambda
Amazon API
Gateway
Browser
Amazon
CloudFront
Amazon S3
Amazon Cognito
Lambda@Edge
34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Lambda@Edge use cases and blueprints
Content customization
Based on user attributes, device properties
Visitor session validation
User-agent validation—add an Access-
Control-Allow-Header
Validate access token to confirm
authentication
URL customization
Rewrite URLs, pretty URLs
A/B testing and cookie-based sticky sessions
“Flip a coin” to select a version of content
displayed to each user
Security
Security header insertions (HSTS, X-
Content-Type-Options, and more)
Bot handling
35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Amazon API
Gateway AWS
Lambda
Amazon
DynamoDB
Amazon
S3
Amazon
CloudFront
• Bucket Policies
• ACLs
• OAI
• Geo-restriction
• Signed cookies
• Signed URLs
• DDoS protection
IAM
AuthZ
Serverless web app security
• Cross-account Lambda
• Throttling (per method)
• Resource policies
• Usage plans
Browser
Amazon Cognito
• Encryption at rest
• VPC endpoint
• Function policies
• Env variables
36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AWS AppSync
DynamoDB table
Lambda function
Amazon ES
GraphQL
schema
Upload
schema
GraphQL
Query
mutation
subscription
Real-time
online/offline
AppSync
API
Amazon Cognito
user pool
Legacy
application
Amazon RDS
https:// HTTP resolver
37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Streaming with Amazon Kinesis
Easily collect, process, and analyze video and data streams in real time
Capture, process, and
store video streams
Kinesis Video
Streams
Load data streams into
data stores
Kinesis Data
Firehose
SQL
Analyze data streams
with SQL
Kinesis Data
Analytics
Capture, process, and
store data streams
Kinesis Data
Streams
39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Streaming data ingestion
Amazon CloudWatch:
Delivery metrics
Amazon S3:
Buffered files
Kinesis
Agent
Record
producers Amazon Redshift:
Table loads
Amazon Elasticsearch Service:
Domain loads
Amazon S3:
Source record backup
AWS Lambda:
Transformations &
enrichment
Amazon DynamoDB:
Lookup tables
Raw records
Lookup
Transformed records
Transformed recordsRaw records
Kinesis Data Firehose:
Delivery stream
40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Streaming data ingestion
Amazon CloudWatch:
Delivery metrics
Amazon S3:
Buffered files
Amazon Redshift:
Table loads
Amazon Elasticsearch Service:
Domain loads
Amazon S3:
Source record backup
AWS Lambda:
Transformations &
enrichment
Amazon DynamoDB:
Lookup tables
Raw records
Lookup
Transformed records
Transformed records
Raw Records
(HTTP
POST/PUT)
Amazon Kinesis Data Firehose:
Delivery stream
Amazon
CloudFront
Lambda@Edge
Browser
41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Amazon Kinesis Data Streams and AWS Lambda
• Number of Kinesis Data Streams shards corresponds to concurrent
invocations of Lambda function
• Batch size sets maximum number of records per Lambda function
invocation
Kinesis Data Streams:
Stream
AWS Lambda:
Processor function
Streaming source Other AWS services
42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Data lake
43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
AWS serverless data lake
Amazon
S3
bucket(s)
Amazon ESAWS
Glue
Amazon
DynamoDB
Catalog & Search
AWS KMS AWS
CloudTrail
IAM Amazon
Macie
Security & Auditing
Amazon
Cognito
Amazon
API
Gateway
IAM
API/UI
Amazon
Athena
Amazon
QuickSight
Amazon
Redshift
Spectrum
Analytics & Processing
AWS
Glue
AWS
Lambda
Kinesis
Data
Streams
Kinesis
Data
Firehose
AWS
Direct
Connect
Ingest
AWS
IoT
44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Search and data catalog
• DynamoDB as metadata
repository
• Amazon Elasticsearch
Service
AWS Lambda
Metadata Index
(DynamoDB)
Search Index
(Amazon ES)
ObjectCreated
ObjectDeleted PutItem
Update Index
S3 Bucket
https://aws.amazon.com/answers/big-data/data-lake-solution/
Catalog & Search
45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Serverless batch processing
AWS Lambda:
Splitter
Amazon S3
Object
Amazon DynamoDB:
Mapper Results
AWS Lambda:
Mappers
….
….
AWS Lambda:
Reducer
Amazon S3
Results
Analytics & Processing
46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Machine learning
47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
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
M L S e r v i c e s
A I S e r v i c e s
A m a z o n
S a g e M a k e r
Amazon
Transcribe
Amazon
Polly
Amazon
Lex
C H A T B O T S
Amazon
Rekognition
Image
Amazon
Rekognition
Video
V I S I O N S P E E C H
Amazon
Comprehend
Amazon
Translate
L A N G U A G E S
F R A M E W O R K S I N T E R F A C E S
Ground Truth Notebooks Algorithms + Marketplace RL Training Optimization Deployment Hosting
The AWS machine learning stack
I N F R A S T R U C T U R E
P3 P3dn C5 C5n
Amazon Elastic
Inference
AWS
Inferentia
AWS IoT
Greengrass
48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
2. Submit
image
4. DetectFaces 7. DetectText
1. Upload
3. Store image Lambda
AWS
Step Functions
5. DetectLabels 6. DetectModerationLabels
8. Store metadata &
analysis
DynamoDB
Amazon ES
Image processing with Amazon Rekognition Image
49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Media analysis solution
S3:
Web interface
Amazon Cognito
Amazon Rekognition Video:
Detect objects, scenes,
faces, & celebrities
Amazon ES:
Search index
API Gateway:
REST APIs
https://aws.amazon.com/answers/media-entertainment/media-analysis-solution/
AWS Elemental MediaConvert:
Transcode videos
S3:
Media storage
Step Functions:
Orchestrate
analysis
50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Call center analytics
Amazon
Connect
Customers
Agents
Contact trace records (CTRs)
Kinesis Data
Streams
Kinesis Data
Firehose
S3: CTRs
Call
recordings
S3: Call
recordings
S3: Call
transcripts
Step Functions:
Orchestrate
S3: Sentiment,
key phrases,
entities
Step Functions:
Orchestrate
S3 Notifications
for call
transcripts
Athena
Amazon
QuickSight
51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Summary
“No server is easier to manage than no server.” - Werner Vogels, Amazon CTO
Never pay for idle & scale as you grow
Apply serverless patterns for common use-cases:
Web applications
Stream processing
Data lake
Machine learning
52. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
What will you build with serverless?
53. Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Mandar Patil
Solutions Architect
AISPL
Vikas Tiwari
Solutions Architect
AISPL
54. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Download our app to enhance
your Summit experience
Access the agenda, build your own
schedule, provide feedback easily
and more
55. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Three ways to get started:
• Scan the QR code on the screen or at
the back of your attendee badge
• Search “AWS Global Summits” in
Apple Store or Google Play
• Visit guidebook.com/app/aws
56. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Tap on the
featured guide
Tap “Download
Guide”
Tap
“Open”
57. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T
Summit Session Feedback
Take a quick five question survey – let us
know how we can improve.
Three ways to take the survey:
• Access the Summit app - session survey tab
• Scan the QR code
• Visit https://amzn.to/summit-session
Ballroom 1 & 2
58. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C T O R
S U M M I T