© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Developing ModernApplications in
theCloud
M A P 0 0 1
SIMON STEWART
CTO, BRIDGEMENT
@simonstewart
COBUS BERNARD
AWSTECHNICAL EVANGELIST
@cobusbernard
Thenewnormal: companies areincreasinglyglobal and
products arecompletelydigital
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
Tomaintaincompetitiveadvantage,
digitalbusinessesmustinnovateasrapidlyas possible
FeedbackIdeas
Experiment
Innovation
Flywheel
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
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OLD WORLD IT
Employees at work
Factories + supply chainSales channels
Marketing analytics
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Employees at work
Factories + supply chainSales channels
Marketing analytics
OLD WORLD IT
NEW WORLD IT
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
NEW WORLD IT Employees at work
Factories +
supply chain
IoT connected
things
Online
marketing
Continuous supply
tracking
Just in time
production
Online sales
+ delivery
Social media
Personalization
Customer tracking
New channels direct to customer
More things, more scale, rapid change
New Needs
Modern application development
creates competitive differentiation
by enabling rapid innovation
AWS customers arepioneering modern applications
Capabilitiesof a modern application
Secure Resilient Elastic
Modular Automated Interoperable
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: ajourney withmany
paths
OptionsAvailable
Re-platform
AWS Fargate
Re-invent
AWS Lambda
Re-factor
AWS Step Functions
Re-Host
Amazon EC2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Modern application checklist
 Enable security and compliance across the entire app lifecycle
 Structure apps as collections of microservices
 Build with serverless technologies as much as possible
 Use code to model applications and infrastructure
 Rapidly release high-quality features with CI/CD
 Gain insights into application behavior with monitoring
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Enablesecurityandcomplianceacrosstheentireapplifecycle
Securing thelifecycleaddressesblind spotswithout
slowingdown 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
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structureappsascollectionsofmicroservices
When theimpact ofchange issmall,
releasevelocitycan 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
Structureappsascollectionsofmicroservices
Whentheimpact ofchange issmall,
releasevelocitycan increase
Microservices
Do one thing – Well
Structureappsascollectionsofmicroservices
Properties of microservices
Microservices
• Independent
• Individually Deployed & Scaled
• Polyglot
• Modular - Easily Replaced
• Decentralized
Structureappsascollectionsofmicroservices
DesignConcepts
• 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
Structureappsascollectionsofmicroservices
APIs and decoupled communications enable
automation and improves reliability
FUNCTION
API
API
MICROSERVICE
FUNCTION
EVENT
API
MICROSERVICE
EVENT
API
MICROSERVICE
APPLICATION
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DatabasesinModernApplications
Relational Key-value
DynamoDBAmazon
RDS
Aurora CommercialCommunity
Relational or not?
Commondatacategoriesandusecases
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
Purpose-builtdatabases
Relational Key-value Document In-memory Graph Time-series Ledger
DynamoDB
NeptuneAmazon
RDS
Aurora CommercialCommunity
Timestream QuantumElastiCache
DocumentD
B
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Buildwithserverlesstechnologiesasmuchaspossible
Automation and abstractionfrees you
No infrastructure to
provision or manage
Automatically scales
by unit of consumption
Pay for value
billing model
Highly available
and durable
Buildwithserverlesstechnologiesasmuchaspossible
Choiceof compute is core tothetransformation
Serverless Containers
Long-running
Abstracts theOS
Fully-managed orchestration
Fully-managed cluster scaling
AWS Fargate
Serverless Functions
Event-driven
Many language runtimes
Data source integrations
No server management
AWS Lambda
Buildwithserverlesstechnologiesasmuchaspossible
AWS container serviceslandscape
Management
Deployment, Scheduling,
Scaling & Management of
containerized applications
Hosting
Where the containers run
Amazon Elastic
Container Service
Amazon Elastic
Container Service
for Kubernetes
Amazon EC2AWS Fargate
Image Registry
Container Image Repository
Amazon Elastic
Container Registry
Buildwithserverlesstechnologiesasmuchaspossible
Choiceof compute is core tothetransformation
Serverless Containers
Long-running
Abstracts theOS
Fully-managed orchestration
Fully-managed cluster scaling
AWS Fargate
Serverless Functions
Event-driven
Many language runtimes
Data source integrations
No server management
AWS Lambda
Buildwithserverlesstechnologiesasmuchaspossible
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
Buildwithserverlesstechnologiesasmuchaspossible
Serverlessarchitecturesprovide thegreatestagility
withtheleasteffort
Focus on creating
business value
Remove heavy lifting with
serverless everything
CUSTOMER
AWS
Messaging & Orchestration
Compute
Physical Infrastructure
API
Business logic
Storage & Databases
Buildwithserverlesstechnologiesasmuchaspossible
AmazonAPIGateway
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
Buildwithserverlesstechnologiesasmuchaspossible
Coordinating multipleserviceswithworkflowsincreases
agility,productivity and flexibility
Track status of data
and execution
Remove redundant
code
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usecodetomodelapplicationsandinfrastructure
Treatingeverythingas softwareincreases thespeed and
agilityof infrastructuredeployments
Design
Write application
code
Create infrastructure
templates
Create stacks Iterate
Usecodetomodelapplicationsandinfrastructure
Infrastructure ascode
Declarative
I tell you
what I need
I tell you
what to do
Imperative
Usecodetomodelapplicationsandinfrastructure
Infrastructure ascode 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
Usecodetomodelapplicationsandinfrastructure
Model function environments withAWS
ServerlessApplication 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/
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rapidlyreleasehigh-qualityfeatureswithCI/CD
TeamsthatpracticeCI/CD
shipmore code faster,and withmore 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
Rapidlyreleasehigh-qualityfeatureswithCI/CD
Monolith development lifecycle
monitorreleasetestbuild
developers
delivery pipelines
services
???
developers
delivery pipelines
services
Rapidlyreleasehigh-qualityfeatureswithCI/CD
Monolithdevelopment lifecycle
developers services
monitorreleasetestbuild
delivery pipelines
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
Rapidlyreleasehigh-qualityfeatureswithCI/CD
Monolithdevelopment lifecycle
Rapidlyreleasehigh-qualityfeatureswithCI/CD
AWSCodeDeploy
• Automates code deployments to any instance and
Lambda
• Handles the complexity of updating your applications
• Avoid downtime during application deployment
• Roll back automatically if failure detected
• Deploy to Amazon EC2, Lambda, or on-premises
servers
Rapidlyreleasehigh-qualityfeatureswithCI/CD
CodeDeploy-Lambda deployments
• Shifts traffic using Lambda function weighted aliases
• Choose canary (“shift 10% of traffic for 10 minutes, then shift rest”) or linear
(“shift 10% more traffic every 10 minutes”)
• Validation “hooks” enable testing at each stage of the deployment
• Fast rollback in seconds if case of hook failure or CloudWatch alarms
• Monitor deployment status and history via console, API, Amazon Simple
Notification Service (Amazon SNS) notifications, and CloudWatch Events
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usemonitoringtooptimizeenduserexperience
Thefasteryou identifyissues,thefastertheycanbe
resolved
Metrics, logs
and traces
Monitoring,
debugging and
alerts
Resource and
application
visibility
Real-time
insights
MONITORING
OBSERVABILITY
X-RayService
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Benefits of usingAWSX-RaywithLambda
• 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.
VisualizeServiceCallGraph (Lambda)
Identifyinitialization& cold starts(Lambda)
Pinpoint errors (Lambda)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
So howdo webuild modern apps?
 Build security and compliance into the entire app lifecycle
 Structure apps as collections of microservices
 Build with serverless technologies as much as possible
 Use code to model applications and infrastructure
 Rapidly release high-quality features with CI/CD
 Gain insights into application behavior with monitoring
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Howproper monitoring helps us sleep at
night and keeps our business running
SIMON STEWART
CTO, BRIDGEMENT
@simonstewart
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
About Bridgement
• Fintech start up
• Complex business logic jobs
• Many 3rd party integrations
• Everything on AWS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Whatweaimfor
• System monitoring for business continuity and team wellbeing
• Measure, improve, measure
• Policing vs Protecting
• Safe learning
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Some of thechallenges
• Documenting what we have
• SQS Deadletter queues & 3rd party integration
• Monitoring availability and response times
• Security audits
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Documenting whatwehave
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SQSDead letterqueues & 3rd partyintegrations
• It’s not a 1-way
journey for the
message
• A failure to process
means something
bad happened
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SQS Deadletter queues & 3rd partyintegrations
Dead letter arrivals
👇
CloudWatch
👇
SNS
👇
Slack
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SQS Deadletter queues & 3rd partyintegrations
Dead letter arrivals
👇
CloudWatch
👇
SNS
👇
Slack
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Monitoring availabilityand response time
• Memory monitoring
• AWS X-Ray
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SecurityAudits
• Well-Architected Framework
• VPC Flow Logs
• Access key usage via CloudTrail
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Wayswe’veimproved our knowledge
• Whitepapers
• Experimenting on AWS via test accounts
• Peer reviews
• ACloud.guru
• Using AWS Support
• “test our knowledge” against the certifications
• Take it slow and understand
• Less typing
• Use what makes sense
• Less things to monitor
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SIMON STEWART
CTO, BRIDGEMENT
@simonstewart
COBUS BERNARD
AWSTECHNICAL EVANGELIST
@cobusbernard
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I TS U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Developing Modern Applications in the Cloud

Editor's Notes

  • #61 Something that I think gets overlooked when talking about the benefits of having proper monitoring in place is the positive impact it can have you on your team. team issues without proper devops in place.  Unhappy Mondays and team burnout  monitoring - what is up/down *AND* metrics that affect user happiness - eg: performance explain why team wellbeing is as important How do we measure Policing & protecting - both are important, but protecting is most