When it comes to building our own services, our engineering groups have strong opinions, and they express them in the technologies they pick: Are microservices always the way to go? Should we choose serverless, containers, or serverless containers? Is relational over? Is Java over? Learn about our experience in building AWS services and working with customers on their cloud-native apps.
2. The new normal: companies are increasingly global
and products are completely digital
47%
of CEOs said they are
being challenged by
the board of directors
to make progress in
digital business
Source: Gartner
79%
of CIOs believe that
digital business is
making their IT
organizations better
prepared to change
67%
of all business leaders
believe that they must
pick up the pace of
digitalization to
remain competitive
3. To maintain competitive advantage,
digital businesses must innovate as rapidly as possible
FeedbackIdeas
Experiment
Innovation
Flywheel
4. Invention requires two things: the
ability to try a lot of experiments,
and not having to live with
the collateral damage of
failed experiments.“
Andy Jassy
CEO, Amazon Web Services
11. Capabilities of a modern application
Secure Resilient Elastic
Modular Automated Interoperable
12. Assess and
prioritize,
app by app
Pick path to
modernization
Lift & shift:
data center → EC2
Re-platform:
VMs → containers
Refactor:
monolith → microservices
Re-invent:
host fleets → serverless
Modern application development: a journey with
many paths
14. migrated ~850 applications running in ~5000 containers to Fargate to
reduce the undifferentiated heavy lifting that came with managing
Kubernetes
Re-platform
AWS Fargate
15. created a serverless stock trade validation system
in 3 months that improved processing times
by 67% while reducing costs by 50%
Re-invent
AWS Lambda
18. Enable security and compliance across the entire app lifecycle
Securing the lifecycle addresses blind spots without
slowing down innovation
Authenticate Authorize Audit & Govern Validate
Prevent unauthorized
access with strong
access control
Implement role-based
access control using
flexible policies
Evaluate app behavior &
ensure compliance
requirements are met
Verify each step to
ensure solutions work
only as intended
20. Structure apps as collections of microservices
When the impact of change is small,
release velocity can increase
Monolithic application
Does everything
Shared release pipeline
Rigid scaling
High impact of change
Hard to adopt new technologies
Microservices
Does one thing
Independent deployments
Independent scaling
Small impact of change
Choice of technology
21. Structure apps as collections of microservices
When the impact of change is small,
release velocity can increase
Microservices
Do one thing – Well
22. Structure apps as collections of microservices
Properties of microservices
Microservices
• Independent
• Individually Deployed & Scaled
• Polyglot
• Modular - Easily Replaced
• Decentralized
23. Structure apps as collections of microservices
Design Concepts
• Use managed services
• Focus on writing your business logic
(not on maintaining infrastructure)
• Loosely coupled & event driven
• Simplify delivery and discovery
AWS Lambda
AWS Fargate
24. Structure apps as collections of microservices
APIs and decoupled communications enable
automation and improves reliability
FUNCTION
API
API
MICROSERVICE
FUNCTION
EVENT
API
MICROSERVICE
EVENT
API
MICROSERVICE
APPLICATION
28. Common data categories and use cases
Relational
Referential
integrity, ACID
transactions,
schema-
on-write
Lift and shift, ERP,
CRM, finance
Key-value
High
throughput, low-
latency reads
and writes,
endless scale
Real-time bidding,
shopping cart,
social, product
catalog, customer
preferences
Document
Store
documents and
quickly access
querying on
any attribute
Content
management,
personalization,
mobile
In-memory
Query by key
with
microsecond
latency
Leaderboards,
real-time analytics,
caching
Graph
Quickly and
easily create
and navigate
relationships
between
data
Fraud detection,
social networking,
recommendation
engine
Time-series
Collect, store,
and process
data sequenced
by time
IoT applications,
event tracking
Ledger
Complete,
immutable, and
verifiable history
of all changes to
application data
Systems
of record, supply
chain, health care,
registrations,
financial
31. Build with serverless technologies as much as possible
Automation and abstraction frees you
No infrastructure to
provision or manage
Automatically scales
by unit of consumption
Pay for value
billing model
Highly available
and durable
32. Build with serverless technologies as much as possible
Choice of compute is core to the transformation
Serverless Containers
Long-running
Abstracts the OS
Fully-managed orchestration
Fully-managed cluster scaling
AWS Fargate
Serverless Functions
Event-driven
Many language runtimes
Data source integrations
No server management
AWS Lambda
33. Build with serverless technologies as much as possible
AWS container services landscape
Management
Deployment, Scheduling,
Scaling & Management of
containerized applications
Hosting
Where the containers run
Amazon Elastic
Container Service
Amazon Elastic
Container Service
for Kubernetes
Amazon EC2
AWS Fargate
Image Registry
Container Image Repository
Amazon Elastic
Container Registry
34. Build with serverless technologies as much as possible
Choice of compute is core to the transformation
Serverless Containers
Long-running
Abstracts the OS
Fully-managed orchestration
Fully-managed cluster scaling
AWS Fargate
Serverless Functions
Event-driven
Many language runtimes
Data source integrations
No server management
AWS Lambda
35. Build with serverless technologies as much as possible
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 You manage
• 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
36. Build with serverless technologies as much as possible
Serverless architectures provide the greatest agility
with the least effort
Focus on creating
business value
Remove heavy lifting with
serverless everything
CUSTOMER
AWS
Messaging & Orchestration
Compute
Physical Infrastructure
API
Business logic
Storage & Databases
37. Build with serverless technologies as much as possible
Amazon API Gateway
Fully managed service that makes it easy for
developers to publish, maintain, monitor,
and secure APIs at any scale
• Native AWS Service Integration
• Stage and version management
• API Authentication
• WebSockets support
38. Build with serverless technologies as much as possible
Coordinating multiple services with workflows
increases agility, productivity and flexibility
Track status of data
and execution
Remove
redundant code
40. Use code to model applications and infrastructure
Treating everything as software increases the speed
and agility of infrastructure deployments
Design
Write application
code
Create infrastructure
templates
Create stacks Iterate
41. Use code to model applications and infrastructure
Infrastructure as code
Declarative
I tell you
what I need
I tell you
what to do
Imperative
42. Use code to model applications and infrastructure
Infrastructure as code goals
1. Make infrastructure changes repeatable and predictable
2. Release infrastructure changes using the same tools as code changes
3. Replicate production environment in a staging environment to enable
continuous testing
43. Use code to model applications and infrastructure
Model function environments with AWS
Serverless Application Model (SAM)
• Open source framework for building serverless
applications on AWS
• Shorthand syntax to express functions, APIs,
databases, and event source mappings
• Transforms and expands SAM syntax into AWS
CloudFormation syntax on deployment
• Supports all AWS CloudFormation resource types
https://aws.amazon.com/serverless/sam/
44. Use code to model applications and infrastructure
SAM template
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources:
GetFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.get
Runtime: nodejs8.10
CodeUri: src/
Policies:
- DynamoDBReadPolicy:
TableName: !Ref MyTable
Events:
GetResource:
Type: Api
Properties:
Path: /resource/{resourceId}
Method: get
MyTable:
Type: AWS::Serverless::SimpleTable
Just 20 lines to create:
• Lambda function
• IAM role
• API Gateway
• DynamoDB table
45. Use code to model applications and infrastructure
Use SAM CLI to package and deploy SAM templates
pip install --user aws-sam-cli
sam logs
sam validate
sam local
sam init
sam build (--use-container)
sam package
sam deploy
sam publish
New
46. Use code to model applications and infrastructure
Nested apps to simplify solving recurring problems
Standard
Component
TweetSource:
Type: AWS::Serverless::Application
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:...
SemanticVersion: 2.0.0
Parameters:
TweetProcessorFunctionName: !Ref MyFunction
SearchText: '#serverless -filter:nativeretweets’
Custom
Business
Logic
48. Rapidly release high-quality features with CI/CD
Teams that practice CI/CD
ship more code faster, and with more confidence
Source: Puppet 2017 State of DevOps Report
5x
Lower change
failure rate
440x
Faster from
commit to deploy
46x
More frequent
deployments
44%
More time spent on
new features & code
49. Rapidly release high-quality features with CI/CD
Monolith development lifecycle
monitorreleasetestbuild
developers
delivery pipelines
services
61. Use monitoring to optimize end user experience
The faster you identify issues, the faster they can be
resolved
Metrics, logs
and traces
Monitoring,
debugging and
alerts
Resource and
application
visibility
Real-time
insights
MONITORING
OBSERVABILITY
64. Benefits of using AWS X-Ray with Lambda
• X-Ray agent is natively built into Lambda.
• Identify initialization and cold starts in Lambda
• Pinpoint issues in downstream services called from your AWS
Lambda function.
• Happens with low latency in real-time. Can see traces in
seconds.
68. Keeps track of all your application
components, their locations, attributes, and
health status.
• Define convenient names for all cloud
resources
• Discover resources with specific attributes
• Ensure only healthy resources are
discovered
• Use highly available DNS and Regional API.
New: AWS Cloud Map