SlideShare a Scribd company logo
ColdFusion Summit 2016
Accessible Video Anywhere
with ColdFusion and AWS
Brian Klaas
Johns Hopkins University
bklaas@jhu.edu
@brian_klaas
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Accessible Video Anywhere with ColdFusion an AWS
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Section 504
Section 508
Title III
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Forces Caveat Overview AWS Services v2 v3 Problems WinsForces
Accessible Video Anywhere
with ColdFusion and AWS
Brian Klaas
Johns Hopkins University
bklaas@jhu.edu
@brian_klaas
Forces Caveat Overview AWS Services v2 v3 Problems WinsCaveat
Forces Caveat Overview AWS Services v2 v3 Problems WinsCaveat
Forces Caveat Overview AWS Services v2 v3 Problems WinsCaveat
Architecture !code
Forces Caveat Overview AWS Services v2 v3 Problems WinsCaveat
Forces Caveat Overview AWS Services v2 v3 Problems WinsOverview
So…
Forces Caveat Overview AWS Services v2 v3 Problems WinsOverview
Forces Caveat Overview AWS Services v2 v3 Problems WinsOverview
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Simple
Storage
Service
S3
AWS Services
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
<cffile action=“read”
file=“s3://somebucket/somefile.txt”
variable=“fileData”/>
<cfdirectory action=“list”
directory=“s3://somebucket/someDirectory”/>
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Simple
Storage
Service
S3
AWS Services
CloudFront
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
http://myDistribution.cloudFront.net/myFile/inS3.mp4
Protect files with signatures or by geographic region
$50/month per TB of traffic
CloudFront
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
We built nothing.
Forces Caveat Overview AWS Services v2 v3 Problems WinsOverview
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
Elastic Transcoder
Massively parallel A/V transcoding engine
Cheaper than most desktop transcoding solutions
Repeatable jobs set up through a web form …or…
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
= Serverless computing
Lambda
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
<1.5 GB RAM
<5 minutes
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
?
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
?
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
= Pub/Sub
Simple Notification Service
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
v1
Forces Caveat Overview AWS Services v2 v3 Problems WinsAWS Services
!
Each S3 bucket can only have one Lambda listener
Track changes across multiple functions
ET jobs run asynchronously, and each gets its own ID
How do we know things are done?
Forces Caveat Overview AWS Services v2 v3 Problems Wins
v1
v2
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Persistence
v2
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Crazy scalable NoSQL document datastore
Pay for reads/writes per second
DynamoDB
Flexible data model as we figured what we needed
v2
Forces Caveat Overview AWS Services v2 v3 Problems Winsv2
Job 2
Job 1
Job 3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv2
Job 2
Job 1
Job 3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv2
Job 2
Job 1
Job 3
All done?
Forces Caveat Overview AWS Services v2 v3 Problems Winsv2
Job 2
Job 1
Job 3
All done?
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Massively scalable infrastructure
API for subscribe/unsub, tracks bounces
Simple Email Service
Lambda functions can handle incoming + bounce msgs
v2
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Video uploaded to S3 input bucket
Lambda processes file
Info about source file is stored in DynamoDB by Lambda function
v2
v2
Lambda function fires off all needed Elastic Transcoder jobs
Elastic Transcoder notifies SNS when each job is done
Lambda processes incoming SNS message
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Information about job is updated in DynamoDB
Lambda function moves transcoded file to S3
v2
v2
Lambda function checks to see if all related jobs are done
If yes, SES message is sent to appropriate team member
If yes, Lambda notifies CF-based LMS to make video available
CloudFront picks up the file for global distribution
Forces Caveat Overview AWS Services v2 v3 Problems WinsOverview
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Bulk purchase savings + variable turnaround time
Highly accurate even on technical jargon + ESL
Caption search plugins
v3
API for job processing and tracking
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
!
Forces Caveat Overview AWS Services v2 v3 Problems Wins
videoID.mp4
v2
videoID^bklaas.mp4videoID^bklaas^sameDay.mp4videoID^bklaas^sameDay^noCaptions.mp4videoID^bklaas^sameDay^noCaptions^otherbucket/otherPath.mp4
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
!
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Security credential system
Users, groups, permissions, roles
Identity Access Management
Extremely fine-grained control over access
v2
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
!
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
Forces Caveat Overview AWS Services v2 v3 Problems Wins
ctlS3Utils: 

https://github.com/brianklaas/ctlS3Utils
ctlCloudFrontUtils:

https://github.com/brianklaas/ctlCloudFrontUtils
CTL Utils Request signing and file property manipulation
v3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
v3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
v3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
Forces Caveat Overview AWS Services v2 v3 Problems Winsv3
Jobs
Forces Caveat Overview AWS Services v2 v3 Problems Wins
😢 Problems
Problems
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Security
Problems
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Always https
Problems
Add the 3rd party certificate to the Java keystore
Security
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Use custom attributes for internal validation
Problems
Security
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Build for idempotence
Problems
Security
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Network timeouts
Problems
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Lambda function execution time limit
Problems
Network
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Store on S3, let 3rd party API grab
Problems
Network
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Retries
Problems
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Backup Lambda or CF functions for retries
Problems
Retries
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Process
Problems
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Debugging in Lambda is awful.
Problems
Process
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Testing Lambda functions is hard.
Problems
Process
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Everything fails.
Problems
Process
Forces Caveat Overview AWS Services v2 v3 Problems Wins
async:waterfall
Problems
Process
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Distributed, moving pieces
Problems
Process
Forces Caveat Overview AWS Services v2 v3 Problems WinsWins
👍 Wins!
Forces Caveat Overview AWS Services v2 v3 Problems Wins
No servers.
No updating.
No admin.
Wins
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Fast!
Wins
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Cheap!
Wins
Forces Caveat Overview AWS Services v2 v3 Problems WinsWins
Fast Cheap
Good
Forces Caveat Overview AWS Services v2 v3 Problems Wins
+ AWS Services
+ Node.js
+ Microservices
Wins
Forces Caveat Overview AWS Services v2 v3 Problems Wins
Learn
Wins
Go Do!
Questions?
Brian Klaas
Johns Hopkins University
bklaas@jhu.edu
@brian_klaas
Thank	you!

More Related Content

Accessible Video Anywhere with ColdFusion an AWS