You are on page 1of 16

Building Serverless

Enterprise
Applications
Using AWS managed services to
build web apps
Agenda
Justification
Application requirements
AWS serverless architecture
Frameworks and tooling
Gotchas
Questions
What’s the business case?
Know why you are building in the cloud
before you start
Hint: It’s probably not to save money
Some ideas
Improve responsiveness to customer needs
Centralize and automate resource management
Document and version environment
Support cyclic or shifting usage patterns (match
supply with demand)
Develop skillsets
AWS Application Models
Lift-and-shift
Take existing virtual machines and move them to
cloud-hosted EC2 instances (rehost)
Quickest and cheapest, but fewest cloud
advantages
Rearchitect
Rebuild application from the ground up using
managed services
Most time consuming and expensive, but most
cloud advantages
Requirements
Basic CRUD operations
Create, read, update, delete
Multi-user
Scalable
Secure (authentication and authorization)
Use managed resources
Align with AWS best practices
Annual Equipment Request App
Used to manage the Library’s annual
purchase and prioritization cycle
20 users with varied roles and permissions
Create, list, update, delete records
Old, ready for rework
Big enough to be non trivial, small enough
that we had a chance of success
Built with PHP (Laravel), jQuery, SQL Server
AWS Architecture

Javascript
HTML
(AngularJS)

CSS Images
API Gateway
S3

Lambda DynamoDB
Auth0
AWS Architecture – S3
Cloud document storage
Hosts static web resources
Can be configured to host public websites
HTML, CSS, JavaScript, images
Supports CNAME aliases
Supports .htaccess style configuration for URL rewrite
and redirect
Supports SSL for custom domain names
Billed for storage and for transfer
AWS Architecture – API Gateway
Acts as the ‘front door’ to the application
Handles authorization and access control
Exposes Lambda functions to your front-end
application code
Billed for API calls
AWS Architecture – Lambda
Run code without servers
Supports Node.js, Python, Java, C#, and Go.
Can use existing libraries
Upload functions, configure triggers
Works closely with API gateway via proxy
integration
Business logic and data access code goes
here
Billed for compute cycles (function run time)
AWS Architecture – DynamoDB
Document database in the cloud
Non-relational (NoSQL)
Fast and scalable
Built in security, backup, restore, caching
Billed for storage and for transfer
Supporting Cast
Auth0
CloudFormation
CloudWatch
Serverless.com
Serverless Framework
The ‘glue’
3rd party service
“A toolkit for deploying and operating serverless
architectures”
Cloud infrastructure as code
Deployment tools
Environment configuration
Profiles
IAM Roles
CloudFormation
Demo
Gotchas
CORS
https
://serverless.com/blog/cors-api-gateway-survival-
guide
/
Lambda Proxy Integration response
Client-side authentication
AWS Custom Authorizers and Auth0
JSON Web Tokens
Example code issues
Framework maturity
Links and Questions
https://github.com/scottmetoyer/libapps-cloud
https://serverless.com/
https://auth0.com/
https://github.com/serverless/examples

You might also like