+ All Categories
Home > Technology > Expand Your ColdFusion App Power with AWS

Expand Your ColdFusion App Power with AWS

Date post: 08-Feb-2017
Category:
Upload: coldfusionconference
View: 331 times
Download: 0 times
Share this document with a friend
55
Expand Your ColdFusion App Power with Amazon Web Services Brian Klaas [email protected] @brian_klaas
Transcript
Page 1: Expand Your ColdFusion App Power with AWS

Expand Your ColdFusion App Power with Amazon Web ServicesBrian Klaas

[email protected]

@brian_klaas

Page 2: Expand Your ColdFusion App Power with AWS

Hello

Page 3: Expand Your ColdFusion App Power with AWS

Hello

Page 4: Expand Your ColdFusion App Power with AWS

Hello

Page 5: Expand Your ColdFusion App Power with AWS

S3 CloudFrontHello

Page 6: Expand Your ColdFusion App Power with AWS

<cffile action=“read” file=“s3://somebucket/somefile.txt” variable=“fileData” />

<cfdirectory action=“list” directory=“s3://somebucket/someDirectory” />

Hello

Page 7: Expand Your ColdFusion App Power with AWS

๏ Try out new tools with no capital investment

๏ Quicker time to market

๏ Scale up more quickly

Hello

Why AWS?

Page 8: Expand Your ColdFusion App Power with AWS

+ =Hello

Page 9: Expand Your ColdFusion App Power with AWS

CloudFront

Page 10: Expand Your ColdFusion App Power with AWS

Cloud Front

Page 11: Expand Your ColdFusion App Power with AWS

Cloud Front

API HTML/Markup

JS/CSS/Images/Videos User Content

Page 12: Expand Your ColdFusion App Power with AWS

Cloud Front

Progressive Download Streaming HTTP Post

Page 13: Expand Your ColdFusion App Power with AWS

Cloud Front

๏ Geographic distribution of video

๏ Faster downloads

๏ Less traffic on our network

๏ ~4TB transfer/month

Sep 2015:

$131.44

Page 14: Expand Your ColdFusion App Power with AWS

Cloud Front

1. Set up source

S3 Bucket

EC2 Instance

2. Create a distribution 3. Point distribution to source

4. Use generated DNS entry, or your own

5. Point to CloudFront URLs in your code

Page 15: Expand Your ColdFusion App Power with AWS

Congratulations!Cloud Front

Page 16: Expand Your ColdFusion App Power with AWS

Cloud Front

Versioning

1. Unique names on every change via preprocessor

2. Sign request with new version number

Require CloudFront

Origin Access Identity

Requires signed requests

CTL CloudFront Utils

https://github.com/brianklaas/ctlCloudFrontUtils

Page 17: Expand Your ColdFusion App Power with AWS

SNS

Page 18: Expand Your ColdFusion App Power with AWS

SNS

๏ Email

๏ SMS (US only)

๏ iOS/Android notifications

๏ HTTP/S endpoint

๏ Other AWS services

Page 19: Expand Your ColdFusion App Power with AWS

SNS

= Pub/Sub

Page 20: Expand Your ColdFusion App Power with AWS

1. Create topic

SNS

2. Authenticated request to create subscription

3. Consumer must confirm subscription

4. Authenticated request to create message

5. All consumers on topic receive message

Page 21: Expand Your ColdFusion App Power with AWS

SNS

Demo

Sending messages to a SNS topic from CF

Page 22: Expand Your ColdFusion App Power with AWS

SNS

Get the latest AWS Java SDK working in CF10+

Add to your cfinstall/lib directory:

aws-java-sdk-x.x.xx.jar jackson-annotations jackson-core jackson-databind joda-time

Page 23: Expand Your ColdFusion App Power with AWS

SNS

1. Go play in the console 2. Learn about IAM roles and permissions

Things you have to do on your own:

Page 24: Expand Your ColdFusion App Power with AWS

SNS

๏ Email

๏ SMS (US only)

๏ iOS/Android notifications via the Amazon Mobile SDK

๏ HTTP/S endpoint

๏ SQS, Lambda

Page 25: Expand Your ColdFusion App Power with AWS

Lambda

Page 26: Expand Your ColdFusion App Power with AWS

Lambda

Page 27: Expand Your ColdFusion App Power with AWS

Lambda

Page 28: Expand Your ColdFusion App Power with AWS

Lambda

No server is easier to manage than no server.

Page 29: Expand Your ColdFusion App Power with AWS

Lambda

= Event–driven computing

Page 30: Expand Your ColdFusion App Power with AWS

Lambda

<1.5 GB RAM <5 minutes

Page 31: Expand Your ColdFusion App Power with AWS

Lambda

2. Upload ZIP1. Write a handler function

3. Invoke an event 4. Handler runs

Page 32: Expand Your ColdFusion App Power with AWS

Lambda

= Microservices infrastructure without having to worry about running containers

or scaling your infrastructure!

Page 33: Expand Your ColdFusion App Power with AWS

Lambda

Logging and Monitoring Third–Party Services

Page 34: Expand Your ColdFusion App Power with AWS

Lambda

Logging and Monitoring Third–Party Services

?

Page 35: Expand Your ColdFusion App Power with AWS

Lambda

Logging and Monitoring Third–Party Services

Customer uploads Emits event with file info Processes event

File details

Alert

Page 36: Expand Your ColdFusion App Power with AWS

Lambda

Async Image Resizing

Emits event with file info Processes eventHandle customer upload, posts to S3

<cffile action=“write” file=“s3://somebucket/images.zip” /> Calls “done” http endpoint

Multiple sizes written to S3

Page 37: Expand Your ColdFusion App Power with AWS

Video Production Workflow

Lambda

Upload to ingest bucket Processes event

Posts to S3

Launches Elastic Transcoder job Puts encoded files

Processes event

Page 38: Expand Your ColdFusion App Power with AWS

Demo

Invoking Lambda functions from CF

Lambda

Page 39: Expand Your ColdFusion App Power with AWS

Lambda

= Focus on building apps, not infrastructure

Page 40: Expand Your ColdFusion App Power with AWS

DynamoDB

Page 41: Expand Your ColdFusion App Power with AWS

Dynamo DB

= Hugely scalable, high-write throughput document data store

Page 42: Expand Your ColdFusion App Power with AWS

Dynamo DB

4. Write3. Set secondary indexes

2. Set hash and range keys1. Set read/write capacity

Page 43: Expand Your ColdFusion App Power with AWS

Logging and Monitoring Third–Party Services

Customer uploads Emits event with file info Processes event

File details

Alert

Dynamo DB

Page 44: Expand Your ColdFusion App Power with AWS

Exam Activity Analytics

Capture learner action Writes batch data Stores batch data

Dynamo DB

?QuickSight

Page 45: Expand Your ColdFusion App Power with AWS

Demo

List, Put, Scan, Filter from CF

Dynamo DB

Page 46: Expand Your ColdFusion App Power with AWS

Condition Expressions

Dynamo DB

.withCondition(N(MAX_SCORE).lt(score) .or(attribute_not_exists(MAX_SCORE)))

Page 47: Expand Your ColdFusion App Power with AWS

Preparing for Outages

Page 48: Expand Your ColdFusion App Power with AWS

The Great DynamoDB Outage of 2015

Outages

Page 49: Expand Your ColdFusion App Power with AWS

Plan for outages.

Outages

(Blame Amazon)

Page 50: Expand Your ColdFusion App Power with AWS

Batch upload from your servers

Outages

Page 51: Expand Your ColdFusion App Power with AWS

Use multiple regions

Outages

Page 52: Expand Your ColdFusion App Power with AWS

Shut off services

Outages

Page 53: Expand Your ColdFusion App Power with AWS

Have a plan.

Outages

Page 54: Expand Your ColdFusion App Power with AWS

Go Do!

Page 55: Expand Your ColdFusion App Power with AWS

[email protected]

@brian_klaas

github.com/brianklaas


Recommended