More Related Content Similar to Built & Delivered in Six Months Using Serverless Technical Patterns and Microservices (20) More from Amazon Web Services (20) Built & Delivered in Six Months Using Serverless Technical Patterns and Microservices1. P U B L I C S E C T O R
S U M M I T
WASHINGTON, D C
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
Built & Delivered in Six months
Using Serverless Technical Patterns
and Microservices
Jack McGurk
Executive Directory
The College Board
3 0 1 2 0 1
Len Henry
Senior Solutions Architect
AWS/WWPS
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
Enabling Technologies
Scholarships for Students
Serverless & ReactJS
How we achieved speed
Technical Lessons
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
…and then the magic happens
• I have personally witnessed the evolution of cloud development at
College Board over the last 3 years.
• Innovation is not a by-product, but, actually the result of investments
in people and technology undertaken by the organization
• People are an organization’s greatest assets
Good people will leverage technologies in a way that solves
problems
• It is important to select technologies that can meet your needs
• Amazon Web Services (AWS) is one of the technologies that has
enabled the College Board to solve their problems
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
Enabling Technologies
• Serverless
• ReactJS
• Amazon DynamoDB
• Amazon Cognito
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 is serverless?
No infrastructure provisioning,
no management
Automatic scaling
Pay for value Highly available and secure
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
Serverless means …
No server or container
management
Flexible scaling
No idle capacity
$
High availability
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
AWS
Lambda
AWS
Fargate
Amazon
API Gateway
Amazon
Simple
Notification
Service
(Amazon SNS)
Amazon
Simple Queue
Service
(Amazon SQS)
AWS
Step Functions
COMPUTE
DATA STORES
INTEGRATION
Amazon Aurora
Serverless
Amazon
Simple Storage
Service (Amazon S3)
Amazon
DynamoDB
AWS
AppSync
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
Serverless compute engine
for containers
Long-running
Bring existing code
Fully managed orchestration
AWS Fargate
Serverless event-driven
code execution
Short-lived
All language runtimes
Data source integrations
AWS Lambda
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
Comparison of operational responsibility
AWS Lambda
Serverless functions
AWS Fargate
Serverless containers
Amazon Elastic Container Service
(ECS)/Amazon Elastic Container
Service for Kubernetes (Amazon EKS)
Container-management as a service
Amazon Elastic Compute Cloud
(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 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
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
Changes to the delivery of software
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
How do I develop and deploy code in a
serverless microservices architecture?
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
Monolith development lifecycle
developers
delivery pipelines
services
monitorreleasetestbuild
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
Microservice development lifecycle
developers services
monitorreleasetestbuild
delivery pipelines
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
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
Automate everything
Decompose for agility
(microservices, 2 pizza teams)
Standardized tools
Infrastructure as code
Belts and suspenders
(governance, templates)
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
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
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
Support for Lambda
deployment with AWS
CodePipeline and
AWS CloudFormation
Support for
rolling and
blue/green
Lambda
deployments
with CodeDeploy
Support for
Fargate and
Amazon ECS
deployments in
CodePipeline
CodePipeline
supports AWS
Config for
improved
governance
CodePipeline
supports
Amazon ECR
as a source
Support for
blue/green
deployments
for Fargate and
Amazon ECS
with
CodeDeploy
2016 20182017
NOV NOV DEC OCT NOV NOV
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
Analyze and debug
issues quickly
End-to-end view of
individual services
Identify customer
impact
Support for
Serverless
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
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
AWS
Cloud9
Python, Node
AWS Toolkit
for PyCharm
Python
AWS Toolkit
for IntelliJ
Developer
Preview
Java, Python
AWS Toolkit
for Visual Studio
Code
Developer
Preview
.NET, Node
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
Developer AWS
CodeCommit
AWS CodeBuild
AWS
CloudFormation
Amazon SNS
Amazon S3
bucket
AWS
stack
stack
stack
pre-create
create stacks
post-create
deploy
AWS CodePipeline
region
region
region
cfn-nag
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
CDK Application
CloudFormation
Template
Stack(s)
Construct Construct
Resources
AWS
CloudFormation
Amazon SQS AWS Lambda Amazon S3
bucket
Amazon
DynamoDB
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
AWS SAM
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
AWS SAM
AWS CloudFormation extension optimized
for serverless
New serverless resource types: functions,
APIs, and tables
Global configurations
Local testing with AWS SAM Command Line
Interface (CLI)
Open specification (Apache 2.0)
2018: API Gateway Authorizers, CORS, DDB
SSE, managed policies
github.com/awslabs/serverless-application-model
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
Amazon DynamoDB
Fully managed nonrelational database for any scale
High performance
Fast, consistent performance
Virtually unlimited throughput
Virtually unlimited storage
Secure
Encryption at rest and transit
Fine-grained access control
PCI, HIPAA, FIPS140-2 eligible
Fully managed
Maintenance-free
Serverless
Auto scaling
Backup and restore
Global tables
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
No Servers
No Administration
Highly Available
All AWS Regions
Extreme Scale
Consistent Performance
AWS Lambda Integration
DynamoDB & Serverless
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
DynamoDB
Advancements over the last few years
VPC
endpoints
April 2017
Auto
scaling
June 2017
DynamoDB
Accelerator (DAX)
April 2017
Time To
Live (TTL)
February 2017
Global tables
On-demand
backup
Encryption at rest
November 2017 November 2017 November 2017
Point-in-time
recovery
March 2018
SLA
June 2018
99.999% SLA
August 2018
Adaptive
capacity ACID
November 2018
Transactions
November 2018
On-demand
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
Federation
Amazon Cognito overview
Web and Mobile
Apps
Amazon
Cognito
Developers focus on what
is special about their app
Amazon Cognito
handles auth and
identity
Managed User
Directory
Hosted UI
AWS Credentials
Standard Tokens
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
Amazon Cognito: Identity management scenarios
Business to Consumer Business to Business
Business to Employee AWS IoT Core Scenarios
Enterprise
DirectoryEnterprise
Directory
SAML
Enterprise
Directory
SAML
AWS IoT
Core
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
Amazon Cognito User Pools—Comprehensive user
flows
Email or Phone
Number Verification
Reset Password
User Sign-Up and
Sign-In
User Profile Data
Multi-factor
Authentication
Customize these User Flows Using AWS Lambda
Token-based
Authentication
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
Custom user flows using AWS Lambda hooks
Category Lambda hook Example scenarios
Custom
authentication
flow
Define auth challenge Determines the next challenge in a custom auth flow
Create auth challenge Creates a challenge in a custom auth flow
Verify auth challenge response Determines whether a response is correct in a custom auth flow
Authentication
events
Pre-authentication Custom validation to accept or deny the sign-in request
Post-authentication Event logging for custom analytics
Pre-token generation Customize claims in the Id token
Sign up
Pre-sign-up Custom validation to accept or deny the sign-up request
Post-confirmation Custom welcome messages or event logging for custom analytics
Migration Migrate users and retain existing passwords
Messages Custom message Advanced customization and localization of messages
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
Amazon Cognito User Pool tokens overview
Access Token
• JSON Web Token
• Used to authorize
requests including
APIs
• Includes
o OAuth scopes
o Amazon Cognito
groups
• Expires in 1 hour
Identity Token
• JSON Web Token
• Can be used for
authentication
• Includes user
profile information
o Attributes
o Amazon Cognito
groups
• Expires in 1 hour
Refresh Token
• Opaque blob
• Used to get new
Id and Access
tokens without re-
authenticating
• Expiration
configurable from
1 day to 10 years
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
AWS Amplify
Categories for application programming with Cloud
services
• Auth, Analytics, Storage, API
• Caching, i18n, logging, message bus
Implemented with AWS services, open for external contribution
JavaScript library, open sourced under Apache 2.0
• Declarative interfaces
• Convention over configuration
React and React Native extensions
• Native bridging for mathematical operations
(Amazon Cognito User Pools)
• Components and HOCs
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
AWS Amplify Auth module
• Declarative APIs for Sign-Up, Sign-In, MFA, credential status
• React Higher-Order Components (HOCs)
• Pre-built UI or build a custom UX
import Amplify, {Auth} from 'aws-amplify';
import awsConfig from './YOUR_PATH_TO_EXPORTS/aws-exports'
Amplify.configure(awsConfig});
Auth.signIn(username, password)
.then(data => console.log(data))
.catch(err => console.log(err));
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
About the College Board
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
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
© 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
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
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
October 18, 2018
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
April 10, 2018
As a team,
We want to build a single
page web application
So that we can learn about
Catapult
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
April 10, 2018
As a team,
We want to build a single
page web application
So that we can learn about
Catapult
October 18, 2018
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
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
Solution
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
ReactJS
Facebook
Airbnb
Uber
Netflix
Fast, simple, and scalable
Lightweight on the client side
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
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
Formula for Speed
Foundations
North Stars | Libraries … we didn’t start at zero.
Serverless – almost immediate focus on business
function.
Agility
Solving one thing at a time
Refactoring is okay
Culture
Technology liberating people
Impact of new talent
Product
A Cathedral to Build
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
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
April 10, 2018
As a team,
We want to build a single
page web application
So that we can learn about
Catapult
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
Agility
• Start upstream from Scrum Teams
• Strong IT / Business Alignment
• Deliver value and iterate
• Co-locate if you can
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
People / Culture
• Agility - Team empowerment
• Technology – Infusing new talent & a
culture of learning.
• Product Vision – driving dedication
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
We had a ONE team mindset
53. © 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
Product
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
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
Per environment
Establishing DevOps
• The College Board Opportunity Scholarships as a way to establish
a DevOps culture in our teams that is still maturing.
AWS Cloud
Developers
Amazon S3 bucket
Template
Git push Git
webhook
AWS CodeCommit AWS CodeBuild AWS CloudFormation
Dev Stack QA Stack Staging Stack
AWS Cloud
AWS CodePipeline
Production
Stack
Non-Production
Account
Production
Account
Approval by two
managers
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
Batch vs.
Event
Mindset Shift
Original Mindset
In Batch, move
existing data
from legacy data
storage into
DynamoDB.
Final Mindset
Based upon
triggering
events (i.e.,
create a new
college list or
modify list),
move data from
legacy data
storage into
DynamoDB.
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
SEO with react-snap
AWS Cloud
Amazon CloudFront AWS Lambda@Edge
VPC Static Prerendered
Site
Single Page
Application
Users
Search Engine
Bots
AWS
CodePipeline
react-snap
runtime build
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
DynamoDB On Demand
• Created in-house solution to scale DynamoDB for different load
types
• Cost Management
• Operational Performance to meet our Non-Functional Requirements
• At 2018 re:Invent AWS announced on-demand DynamoDB scaling
• Fast Adoption
• Lesson: AWS Services do evolve
• Check the product roadmap
• Discuss with your AWS TAM
• When no solution – create your own – flexibility on your approach
November 2018
On-demand
59. © 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
September November
Application Hardening
• Scenario Planning
• Negative Ops / Experience
• Mobile Testing
• Application Monitoring
• Performance
“On a scale
from 1 to 10”
60. © 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
Cost
$123.41
61. © 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
62. © 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
Take Aways
• Serverless with Amazon S3, DynamoDB, and Lambdas helped our
teams focus quickly on business function.
• Foundational investment in Agile and modernity in our stack
helped drive culture, attracting talent, and speed. We were
comfortable refactoring.
• There is connective tissue between technology, agility, and
product in creating a culture.
63. © 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
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
Len Henry
awshenry@amazon.com
64. © 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
© 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