SlideShare uma empresa Scribd logo
1 de 104
Baixar para ler offline
STEP INTO
SERVERLESS WITH
AWS & CFML
Brian Klaas
brian.klaas@gmail.com
@brian_klaas
HELLO!
HI, LAMBDA!
SERVERLESS
YES, THERE ARE STILL SERVERS…
SERVERLESS
NO SERVER
IS EASIER TO MANAGE
THAN NO SERVER.
SERVERLESS
SERVERLESS IS
APPLICATION
FUNCTIONALITY
STORAGE S3, GLACIER, EFS
MEDIA ELASTIC TRANSCODER, MEDIA CONVERT,
MEDIA LIVE, KINESIS VIDEO STREAMS
AI
REKOGNITION, POLLY, TRANSLATE,
TRANSCRIBE, COMPREHEND, LEX,
SAGEMAKER
DB RDS, DYNAMODB, AURORA, REDSHIFT
CONTAINER ECS, FARGATE
SERVERLESS
SERVERLESS = FUNCTIONS
SERVERLESS
HELLO LAMBDA (NODE.JS)
exports.handler = (event, context, callback) => {
var firstNumber = event.firstVal;
var secondNumber = event.secondVal;
var result = firstNumber * secondNumber;
callback(null, result);
};
SERVERLESS
(RE)BUILDING THE MICROLITH
COMPANY / PRESENTATION NAME
VIDEO TRANSCODING WORKFLOW
THE PROBLEM
WE DON’T BUILD FUNCTIONS.
WE BUILD APPLICATIONS.
THE PROBLEM
ORCHESTRATE WORKFLOWS BETWEEN FUNCTIONS?
THE PROBLEM
BRANCHING?
ERROR HANDLING?
RETRIES?
THE PROBLEM
STEP FUNCTIONS
PROBLEM SOLVED!
THE SOLUTION
EMBRACE AWS
EXTEND WITH CFML
THE SOLUTION
EMBRACE AI SERVICES IN AWS
EXTEND WITH CFML
THE SOLUTION
AWS PLAYBOX APP
https://github.com/brianklaas/awsPlaybox
CODE REPO
SORRY, NO IAM
MY USUAL CAVEAT
WHAT ARE STEP FUNCTIONS?
WHAT ARE STEP FUNCTIONS?
VISUAL, SERVERLESS
ORCHESTRATION
WHAT ARE STEP FUNCTIONS?
AUTOMATED,
MULTI–STEP,
ASYNCHRONOUS,
SERVERLESS WORKFLOWS IN AWS
WHAT ARE STEP FUNCTIONS?
STATE MACHINES
WHAT ARE STEP FUNCTIONS?
WHAT DOES STATE–BASED WORKFLOW LOOK LIKE?
WHAT ARE STEP FUNCTIONS?
START DECIDESTEP 1
CHOICE A
CHOICE B
END
VISUAL
ORCHESTRATION
WHAT ARE STEP FUNCTIONS?
Via the AWS Console
STATE TYPES TO CHOOSE FROM
Task
Sequence
Parallel
Branch
Wait
Success
Failure
WHAT ARE STEP FUNCTIONS?
SHARE DATA BETWEEN STEPS
Must be expressed in JSON
Traverse with JSONPath pathing ( https://github.com/json-path/JsonPath )
Reference path: $.someVariableName
InputPath = filter selection of current state’s raw input to go into task (function)
ResultPath = reference path to data coming out of task (function)
OutputPath = filter selection of current task (function) result, to serve as input for next state
WHAT ARE STEP FUNCTIONS?
BUILD AND VALIDATE
STATE MACHINES IN
THE AWS CONSOLE
Not using the console? Use statelint



https://github.com/awslabs/statelint

WHAT ARE STEP FUNCTIONS?
EXAMPLE WORKFLOW:
DESCRIBE AN IMAGE
LAMBDA S3 REKOGNITION CFML!
EXAMPLE 1
STATE TYPES IN THE EXAMPLE
Task
Choice
Pass
Fail
Succeed
EXAMPLE 1: DESCRIBING AN IMAGE
WORKFLOW OVERVIEW
EXAMPLE 1: DESCRIBING AN IMAGE
START IS <=50?
GENERATE
RANDOM
NUMBER
USE IMAGE 1
USE IMAGE 2
DETECT
LABELS
EXECUTION
DIAGRAM
EXAMPLE 1: DESCRIBING AN IMAGE
TASK STATES
"States": {
"generateRandomNumber": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:generateRandomNumber",
"ResultPath": "$.randomNumber",
"Next": "ChoiceState"
},
EXAMPLE 1: DESCRIBING AN IMAGE
HOW DOES LAMBDA WORK?
EXAMPLE 1: DESCRIBING AN IMAGE
<1.5GB RAM
< 5 minutes
}
WRITING CODE
FOR LAMBDA
Upload a ZIP containing source and
dependencies
Must zip the folder contents, not the
containing folder
50MB size limit
Point to a ZIP on S3
Code using Cloud9 Editor in the console
EXAMPLE 1: DESCRIBING AN IMAGE
GENERATE RANDOM NUMBER FUNCTION
exports.handler = (event, context, callback) => {
var min = event.min ? event.min : 1;
var max = event.max ? event.max : 100;
var result = Math.floor(Math.random() * (max - min)) + min;
callback(null, result);
};
EXAMPLE 1: DESCRIBING AN IMAGE
TASK STATES
"States": {
"generateRandomNumber": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-east-1:XXXXXXXXXXXX:function:generateRandomNumber",
"ResultPath": "$.randomNumber",
"Next": "ChoiceState"
},
EXAMPLE 1: DESCRIBING AN IMAGE
CHOICE STATES
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.randomNumber",
"NumericLessThanEquals": 50,
"Next": "setDataForImageOne"
},
{
"Variable": "$.randomNumber",
"NumericGreaterThan": 50,
"Next": "setDataForImageTwo"
}
],
"Default": "WhyAreWeHereState"
EXAMPLE 1: DESCRIBING AN IMAGE
COMPARATORS FOR CHOICE STATES
StringEquals
StringLessThan
StringGreaterThan
StringLessThanEquals
StringGreaterThanEquals
NumericEquals
NumericLessThan
NumericGreaterThan
NumericLessThanEquals
NumericGreaterThanEquals
BooleanEquals
TimestampEquals
TimestampLessThan
TimestampGreaterThan
TimestampLessThanEquals
TimestampGreaterThanEquals
And
Or
Not
EXAMPLE 1: DESCRIBING AN IMAGE
CHOICE STATES
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.randomNumber",
"NumericLessThanEquals": 50,
"Next": "setDataForImageOne"
},
{
"Variable": "$.randomNumber",
"NumericGreaterThan": 50,
"Next": "setDataForImageTwo"
}
],
"Default": "WhyAreWeHereState"
EXAMPLE 1: DESCRIBING AN IMAGE
PASS STATES
"setDataForImageOne": {
"Type" : "Pass",
"Result": { "s3Bucket": "conferencedemobucket", "s3Key": "images/familyFaces.jpg" },
"Next": "getImageLabels"
},
“setDataForImageTwo": {
"Type" : "Pass",
"Result": { "s3Bucket": "conferencedemobucket", "s3Key": "images/dogForLabels.jpg" },
"Next": "getImageLabels"
},
EXAMPLE 1: DESCRIBING AN IMAGE
REKOGNIZING THE IMAGE
"getImageLabels": {
"Type" : "Task",
"Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:detectLabelsForImage",
"Next": "Finish"
},
EXAMPLE 1: DESCRIBING AN IMAGE
REKOGNITION
EXAMPLE 1: DESCRIBING AN IMAGE
WHAT CAN REKOGNITION DO?
DETECT IMAGE ELEMENTS IDENTIFY FACES ANALYZE/MATCH FACES IDENTIFY TEXT
EXAMPLE 1: DESCRIBING AN IMAGE
DETECT LABELS FOR IMAGE (NODE.JS)
var params = {
Image: {
S3Object: {
Bucket: srcBucket,
Name: srcKey
}
},
MaxLabels: 10,
MinConfidence: 70
};
rekognition.detectLabels(params)
.promise().then(function (data) {
data.s3Bucket = srcBucket;
data.s3Key = srcKey;
callback(null, data);
}).catch(function (err) {
callback(err);
});
EXAMPLE 1: DESCRIBING AN IMAGE
WHAT DOES
RECOGNITION
TELL US?
EXAMPLE 1: DESCRIBING AN IMAGE
END STATES
"WhyAreWeHereState": {
"Type": "Fail",
"Cause": "We really should not have ended up here from a numeric value decision."
},
"Finish": {
"Type": "Succeed"
}
EXAMPLE 1: DESCRIBING AN IMAGE
SO WHERE DOES COME IN?
EXAMPLE 1: DESCRIBING AN IMAGE
IS THE SCHEDULER
AND EXECUTOR
EXECUTING STEP FUNCTIONS FROM CFML
YOUR CFML NEEDS TO:
Make an execution request
Get the ARN of the execution for follow–up
Check on completion
If complete, get the results
EXECUTING STEP FUNCTIONS FROM CFML
USING THE
AWS JAVA SDK
Add to cfusion/lib:
aws-java-sdk-1.11.xxx.jar
jackson-annotations-2.6.0.jar
jackson-core-2.6.7.jar
jackson-databind-2.6.7.1.jar
joda-time-2.8.1.jar
EXECUTING STEP FUNCTIONS FROM CFML
MAKE AN EXECUTION REQUEST
arnOfFunctionToInvoke = “arn:aws:states:us-
east-1:XXXXXXXXX:stateMachine:confDemoSimpleDecisionMachine”
executionRequest = CreateObject('java',
‘com.amazonaws.services.stepfunctions.model.StartExecutionRequest').init();
executionRequest.setStateMachineArn(arnOfFunctionToInvoke);
executionResult = stepFunctionService.StartExecution(executionRequest);
EXECUTING STEP FUNCTIONS FROM CFML
GET ARN OF EXECUTION
executionResult = stepFunctionService.StartExecution(executionRequest);
executionARN = executionResult.getExecutionARN();
EXECUTING STEP FUNCTIONS FROM CFML
CHECK ON COMPLETION
describeExecutionRequest = CreateObject('java',
‘com.amazonaws.services.stepfunctions.model.DescribeExecutionRequest').init();
describeExecutionRequest.setExecutionArn(executionARN);
executionResult = stepFunctionService.describeExecution(describeExecutionRequest);
EXECUTING STEP FUNCTIONS FROM CFML
IF COMPLETE, GET THE RESULTS
stepFunctionResult.status = executionResult.getStatus();
if (stepFunctionResult.status IS ‘SUCCEEDED’) {
stepFunctionResult.finishedOn = executionResult.getStopDate();
stepFunctionResult.output = DeserializeJSON(executionResult.getOutput());
}
EXECUTING STEP FUNCTIONS FROM CFML
ASYNCHRONOUS STATUS CHECKING
Scheduled task
Persist execution ARNs
EXECUTING STEP FUNCTIONS FROM CFML
EXAMPLE WORKFLOW:
TRANSCRIBE AND TRANSLATE A VIDEO
LAMBDA POLLY
EXAMPLE 2
TRANSCRIBE TRANSLATE
WHY IS THIS USEFUL?
ACCESSIBILITY EFFICIENCY UTILITY INTERNATIONALIZATION
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
NEW STATE TYPES IN THE EXAMPLE
Task with Retries
Wait
Parallel
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
EXECUTION
DIAGRAM
Wait loop
Parallel execution
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
WORKFLOW OVERVIEW
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
START TRANSCRIBE END
TRANSLATE
ES
TRANSLATE
FR
TRANSLATE
DE
SPEAK
ES
SPEAK
FR
SPEAK
DE
THROTTLING
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
RETRIES ARE KEY
TO HANDLING
THROTTLED SERVICES
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
KICKOFF TASK
"transcribeMP4": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:XXXXXXXXX:function:cfdemoStartTranscribeJob",
"Next": "WaitForTranscriptionComplete",
"Retry": [
{
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 30,
"MaxAttempts": 3,
"BackoffRate": 10
}
] }
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSCRIBE
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
AWS TRANSCRIBE
Accepts MP4, MP3, WAV, FLAC
Understands English (US), Spanish (US)
Transcriptions with punctuation
Recognizes multiple speakers
Timestamp each word
Supports custom vocabulary for discipline–specific words
$0.0004 per second
60 minutes free per month
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
START TRANSCRIPTION JOB TASK
var returnData = {
jobName: event.jobName
}
var params = {
LanguageCode: 'en-US',
Media: {
MediaFileUri: event.srcFile
},
MediaFormat: event.mediaType,
TranscriptionJobName: event.jobName
}
Transcribe.startTranscriptionJob(params, function(err,
data) {
if (err) {
console.log(err, err.stack);
callback(err, null)
} else {
console.log(data); // successful response
callback(null, returnData);
}
});
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
HOW DO WE HANDLE FULLY
ASYNCHRONOUS TASKS?
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
LOOPING IN
A STEP FUNCTION
CAPLINE HEADER ELEMENT
Wait
Check job status
Job status done?
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
LOOPING IN STEP FUNCTIONS
"WaitForTranscriptionComplete": {
"Type": "Wait",
"Seconds": 30,
"Next": "Get Job Status"
},
"Get Job Status": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-
east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus",
"Next": "Transcript Complete?"
},
"Transcript Complete?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.jobStatus",
"StringEquals": "FAILED",
"Next": "Transcript Failed"
},
{
"Variable": "$.jobStatus",
"StringEquals": "COMPLETED",
"Next": "Get Transcription File"
}
],
"Default": "WaitForTranscriptionComplete"
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
WAIT STATES
Seconds
Timestamp
Expiration date
Timestamp path (variable)
"TimestampPath": "$.expirationdate"
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
LOOPING IN STEP FUNCTIONS
"WaitForTranscriptionComplete": {
"Type": "Wait",
"Seconds": 30,
"Next": "Get Job Status"
},
"Get Job Status": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-
east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus",
"Next": "Transcript Complete?"
},
"Transcript Complete?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.jobStatus",
"StringEquals": "FAILED",
"Next": "Transcript Failed"
},
{
"Variable": "$.jobStatus",
"StringEquals": "COMPLETED",
"Next": "Get Transcription File"
}
],
"Default": "WaitForTranscriptionComplete"
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
CHECKING THE JOB STATUS
var params = { TranscriptionJobName: jobName }
var request = Transcribe.getTranscriptionJob(params, function(err, data) {
if (err) { // an error occurred
callback(err, null);
} else { // successful response, return job status
var returnData = {
jobName: jobName,
jobStatus: data.TranscriptionJob.TranscriptionJobStatus,
transcriptFileUri: data.TranscriptionJob.Transcript.TranscriptFileUri,
transcriptFileName: jobName
};
callback(null, returnData);
}
});
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
LOOPING IN STEP FUNCTIONS
"WaitForTranscriptionComplete": {
"Type": "Wait",
"Seconds": 30,
"Next": "Get Job Status"
},
"Get Job Status": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-
east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus",
"Next": "Transcript Complete?"
},
"Transcript Complete?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.jobStatus",
"StringEquals": "FAILED",
"Next": "Transcript Failed"
},
{
"Variable": "$.jobStatus",
"StringEquals": "COMPLETED",
"Next": "Get Transcription File"
}
],
"Default": "WaitForTranscriptionComplete"
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
GETTING THE TRANSCRIPTION RESULT
Transcript does not go into a bucket you own!
Time limited URI returned from getTranscriptionJob()
"TranscriptFileUri": “https://s3.amazonaws.com/aws-transcribe-us-east-1-prod/683830609677/
confDemo-1523559305156/asrOutput.json?X-Amz-Security-
Token=FQoDYXdzEEoaDFIZWqjw%2FgCc3kQGWSK3A43rTlruH70hezLPxIDyUEk%2Fk9Ga%2F6
eRg7Hwpe5WpMoQQ0it…”
Token is tied to account that generated the Transcribe job
Grab and move to S3 for future use
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
SAVING THE TRANSCRIBE OUTPUT
getTranscript(transcriptFileUri).then(function(getTranscriptResponse) {
return writeTranscriptToS3(getTranscriptResponse,transcriptFileName);
}).then(function(filePathOnS3) {
var returnData = {
transcriptFilePathOnS3: filePathOnS3,
transcriptFileName: transcriptFileName
};
callback(null, returnData);
}).catch(function(err) {
callback(err, null);
})
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
PROMISE ALL THE THINGS!
function getTranscript(transcriptFileUri) {
return new Promise(function(resolve, reject) {
https.get(transcriptFileUri, res => {
res.setEncoding("utf8");
let body = "";
res.on("data", data => {
body += data;
});
res.on("end", () => {
body = JSON.parse(body);
let transcript = body.results.transcripts[0].transcript;
resolve(transcript);
});
res.on("error", (err) => {
reject(Error(err));
});
});
});
function writeTranscriptToS3(transcript,transcriptFileName) {
return new Promise(function(resolve, reject) {
let filePathOnS3 = 'transcripts/' + transcriptFileName + '.txt';
var params = {
Bucket: 'conferencedemobucket',
Key: filePathOnS3,
Body: transcript
};
var putObjectPromise = S3.putObject(params).promise();
putObjectPromise.then(function(data) {
resolve(filePathOnS3);
}).catch(function(err) {
reject(Error(err));
});
});
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
EXECUTION
DIAGRAM
Wait loop
Parallel execution
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
PARALLEL TASKS
Significantly speed workflow execution
Cannot be dynamically generated
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
PARALLEL TASKS
"Make Versions": {
"Type": "Parallel",
"Next": "Workflow Complete",
"Branches": [
{
"StartAt": "makeSpanishStart",
"States": {
"makeSpanishStart": {},
"makeSpanishText": {},
"makeSpanishAudioFile": {}
}, // end branch
{
"StartAt": “makeFrenchStart",
"States": {
{
"makeFrenchStart": {},
"makeFrenchText": {},
"makeFrenchAudioFile": {}
}, // end branch
] }
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
Parallel
Branch 1
Parallel
Branch 2
STEPS IN EACH
PARALLEL TASK
Define which language to use (Pass)
Translate text (Task)
Prep translated text for speech (Task)
Speak translated text (Task)
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
DEFINE WHAT LANGUAGE TO USE
"makeSpanishStart": {
"Type": "Pass",
"Result": "es",
"ResultPath": "$.languageToUse",
"Next": "makeSpanishText"
},
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSLATE ENGLISH TEXT
"makeSpanishText": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:cfdemoTranslateText",
"Next": "prepSpanishVoiceOutput",
"Retry": [
{
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 60,
"MaxAttempts": 3,
"BackoffRate": 5
}
] }
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSLATE
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
AWS TRANSLATE
To/from English only
Arabic (ar)
Chinese (Simplified) (zh)
French (fr)
German (de)
Portuguese (pt)
Spanish (es)
Limit of 5000 characters per 10 seconds
$15 per million characters
2 million characters free per month
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSLATING TEXT
getTranscriptFile(transcriptFileOnS3).then(function(getTranscriptResponse) {
return translateText(getTranscriptResponse, languageToUse);
}).then(function(translatedTextObj) {
var returnData = {
translatedText: translatedTextObj.TranslatedText,
languageOfText: languageToUse,
sourceTranscriptFileName: sourceTranscriptFileName
}
callback(null, returnData);
}).catch(function(err) {
callback(err, null);
})
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSLATING TEXT
function translateText(textToTranslate, languageToUse) {
return new Promise(function(resolve, reject) {
// Current maximum length for translation of 5000 chars
var maxLength = 4500;
var trimmedString = textToTranslate.substr(0,
maxLength);
// We don't want to pass in words that are cut off
trimmedString = trimmedString.substr(0,
Math.min(trimmedString.length, trimmedString.lastIndexOf("
")));
var params = {
SourceLanguageCode: 'en',
TargetLanguageCode: languageToUse,
Text: trimmedString
};
Translate.translateText(params, function(err, data) {
if (err) {
reject(Error(err));
} else {
console.log("Successful translation:n");
resolve(data);
}
});
});
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TRANSLATE ENGLISH TEXT
"makeSpanishText": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:cfdemoTranslateText",
"Next": "prepSpanishVoiceOutput",
"Retry": [
{
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 60,
"MaxAttempts": 3,
"BackoffRate": 5
}
] }
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
PREPARING THE TRANSLATED TEXT FOR SPEECH
"prepSpanishVoiceOutput": {
"Type": "Task",
"Resource": “arn:aws:lambda:us-east-1:XXX:function:cfDemoPrepTranslatedTextForSpeech",
"Next": "makeSpanishAudioFile"
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
VARIABLE REASSIGNMENT IN
STEP FUNCTIONS IS A PAIN
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
REASSIGNING VARIABLES
exports.handler = (event, context, callback) => {
var textToSpeak = event.translatedText;
var languageOfText = event.languageOfText;
var transcriptFileName = event.sourceTranscriptFileName;
var returnData = {
textToSpeak: textToSpeak,
languageOfText: languageOfText,
transcriptFileName: transcriptFileName
}
callback(null, returnData);
};
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TURNING TEXT INTO SPEECH
"makeSpanishAudioFile": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:XXXXXXX:function:cfDemoConvertTextToSpeech",
"Retry": [
{
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 60,
"MaxAttempts": 3,
"BackoffRate": 5
}
],
"End": true
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
POLLY
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
AWS POLLY
Male and female voices in
Danish
Dutch
English (AU, GB, GB-WLS, IN, US)
French (FR, FR-CA)
German
Icelandic
Italian
Japanese
Korean
Norweigan
Polish
Portuguese (BR, PT)
Romanian
Russian
Spanish (ES, US)
Swedish
Turkish
Welsh
Limit of 100 requests per second
$4 per 1 million characters for speech
5 million characters free per month
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TURNING TEXT INTO SPEECH
makeMP3FromText(textToSpeak, languageOfText).then(function(makeMP3Result) {
return writeFileToS3(makeMP3Result.AudioStream, languageOfText, fileNameForOutput);
}).then(function(mp3FileNameOnS3) {
var returnData = {};
returnData["mp3FileNameOnS3-"+languageOfText] = mp3FileNameOnS3
callback(null, returnData);
}).catch(function(err) {
callback(err, null);
})
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TURNING TEXT INTO SPEECH
function makeMP3FromText(textToSpeak, languageOfText) {
return new Promise(function(resolve, reject) {
var voiceToUse = 'Ivy';
// Polly has a current maximum character length of 3000 characters
var maxLength = 2900;
var trimmedText = textToSpeak.substr(0, maxLength);
switch(languageOfText) {
case 'es':
voiceToUse = (Math.random() >= 0.5) ? "Penelope" : “Miguel"; break;
case 'fr':
voiceToUse = (Math.random() >= 0.5) ? "Celine" : “Mathieu"; break;
case 'de':
voiceToUse = (Math.random() >= 0.5) ? "Vicki" : “Hans"; break;
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TURNING TEXT INTO SPEECH
var params = {
OutputFormat: "mp3",
SampleRate: "8000",
Text: trimmedText,
VoiceId: voiceToUse
}
var speakPromise = Polly.synthesizeSpeech(params).promise();
speakPromise.then(function(data) { // successfully created MP3 stream
resolve(data);
}).catch(function(err) {
reject(Error(err));
});
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
TURNING TEXT INTO SPEECH
"makeSpanishAudioFile": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:XXXXXXX:function:cfDemoConvertTextToSpeech",
"Retry": [
{
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 60,
"MaxAttempts": 3,
"BackoffRate": 5
}
],
"End": true
}
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
EXECUTION
DIAGRAM
Wait loop
Parallel execution
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
SO WHERE DOES COME IN?
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
IS THE SCHEDULER
AND EXECUTOR
EXECUTING STEP FUNCTIONS FROM CFML
YOUR CFML NEEDS TO:
Make an execution request
Get the ARN of the execution for follow–up
Check on completion
If complete, get the results
CF2018: Futures?
EXECUTING STEP FUNCTIONS FROM CFML
3 DAYS
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
PRODUCTION IMPROVEMENTS
Improved handling of service limitations
Logical chunking / chunk stitching
Search video via Elasticsearch
EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
GO DO!
WHAT’S NEXT?
AWS Playbox
https://github.com/brianklaas/awsPlaybox
brian.klaas@gmail.com
@brian_klaas
WHAT’S NEXT?

Mais conteúdo relacionado

Mais procurados

Intro to Batch Processing on AWS - DevDay Austin 2017
Intro to Batch Processing on AWS - DevDay Austin 2017Intro to Batch Processing on AWS - DevDay Austin 2017
Intro to Batch Processing on AWS - DevDay Austin 2017Amazon Web Services
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete FreitagOrtus Solutions, Corp
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Amazon Web Services
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Claus Ibsen
 
Apache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxApache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxClaus Ibsen
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Hyun-Mook Choi
 
The Good Parts / The Hard Parts
The Good Parts / The Hard PartsThe Good Parts / The Hard Parts
The Good Parts / The Hard PartsNoah Zoschke
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performanceSteven Shim
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersClaus Ibsen
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Claus Ibsen
 
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...Amazon Web Services Korea
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1Steven Shim
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891NetApp
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Codemotion
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesRachel Reese
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGeorge Tourkas
 
Managed Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECSManaged Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECSPhilipp Garbe
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationClaus Ibsen
 
Amazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon Web Services
 

Mais procurados (20)

Intro to Batch Processing on AWS - DevDay Austin 2017
Intro to Batch Processing on AWS - DevDay Austin 2017Intro to Batch Processing on AWS - DevDay Austin 2017
Intro to Batch Processing on AWS - DevDay Austin 2017
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017
 
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
Cloud-Native Integration with Apache Camel on Kubernetes (Copenhagen October ...
 
Apache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxApache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the box
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
The Good Parts / The Hard Parts
The Good Parts / The Hard PartsThe Good Parts / The Hard Parts
The Good Parts / The Hard Parts
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performance
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
 
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1
 
Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891Developingapiplug insforcs-151112204727-lva1-app6891
Developingapiplug insforcs-151112204727-lva1-app6891
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservices
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAM
 
Managed Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECSManaged Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECS
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
Amazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep DiveAmazon EC2 Container Service: Deep Dive
Amazon EC2 Container Service: Deep Dive
 

Semelhante a Step into serverless into the box 2018

Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsMatt Lavin
 
Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Codemotion
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endEzequiel Maraschio
 
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesServerless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesDaniel Zivkovic
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps_Fest
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiecturesIegor Fadieiev
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAmazon Web Services
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxAmazon Web Services
 
Writing Redis in Python with asyncio
Writing Redis in Python with asyncioWriting Redis in Python with asyncio
Writing Redis in Python with asyncioJames Saryerwinnie
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDanilo Poccia
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivAmazon Web Services
 
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...Cloud Native Day Tel Aviv
 
Taking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) FamilyTaking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) FamilyBen Hall
 
Schedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaSchedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaMaximilian Jackson
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesChris Bailey
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkLuciano Mammino
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesChris Bailey
 
AWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A SymphonyAWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A SymphonyAmazon Web Services
 
Decompose the monolith into AWS Step Functions
Decompose the monolith into AWS Step FunctionsDecompose the monolith into AWS Step Functions
Decompose the monolith into AWS Step FunctionsbeSharp
 

Semelhante a Step into serverless into the box 2018 (20)

Node Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functionsNode Summit 2018 - Optimize your Lambda functions
Node Summit 2018 - Optimize your Lambda functions
 
Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...Alex Casalboni - Configuration management and service discovery - Codemotion ...
Alex Casalboni - Configuration management and service discovery - Codemotion ...
 
Fullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-endFullstack conf 2017 - Basic dev pipeline end-to-end
Fullstack conf 2017 - Basic dev pipeline end-to-end
 
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesServerless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best Practices
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiectures
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptxTrack 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
Track 4 Session 2_MAD03 容器技術和 AWS Lambda 讓您專注「應用優先」.pptx
 
Writing Redis in Python with asyncio
Writing Redis in Python with asyncioWriting Redis in Python with asyncio
Writing Redis in Python with asyncio
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel AvivSelf Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
Self Service Agile Infrastructure for Product Teams - Pop-up Loft Tel Aviv
 
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
 
Taking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) FamilyTaking advantage of the Amazon Web Services (AWS) Family
Taking advantage of the Amazon Web Services (AWS) Family
 
Schedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS LambdaSchedule File Transfer from SFTP to S3 with AWS Lambda
Schedule File Transfer from SFTP to S3 with AWS Lambda
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Going Serverless
Going ServerlessGoing Serverless
Going Serverless
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless framework
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
AWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A SymphonyAWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
 
Decompose the monolith into AWS Step Functions
Decompose the monolith into AWS Step FunctionsDecompose the monolith into AWS Step Functions
Decompose the monolith into AWS Step Functions
 

Mais de Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 

Mais de Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Step into serverless into the box 2018

  • 1. STEP INTO SERVERLESS WITH AWS & CFML Brian Klaas brian.klaas@gmail.com @brian_klaas HELLO!
  • 3. YES, THERE ARE STILL SERVERS… SERVERLESS
  • 4. NO SERVER IS EASIER TO MANAGE THAN NO SERVER. SERVERLESS
  • 5. SERVERLESS IS APPLICATION FUNCTIONALITY STORAGE S3, GLACIER, EFS MEDIA ELASTIC TRANSCODER, MEDIA CONVERT, MEDIA LIVE, KINESIS VIDEO STREAMS AI REKOGNITION, POLLY, TRANSLATE, TRANSCRIBE, COMPREHEND, LEX, SAGEMAKER DB RDS, DYNAMODB, AURORA, REDSHIFT CONTAINER ECS, FARGATE SERVERLESS
  • 7. HELLO LAMBDA (NODE.JS) exports.handler = (event, context, callback) => { var firstNumber = event.firstVal; var secondNumber = event.secondVal; var result = firstNumber * secondNumber; callback(null, result); }; SERVERLESS
  • 10. WE DON’T BUILD FUNCTIONS. WE BUILD APPLICATIONS. THE PROBLEM
  • 11. ORCHESTRATE WORKFLOWS BETWEEN FUNCTIONS? THE PROBLEM
  • 14. EMBRACE AWS EXTEND WITH CFML THE SOLUTION
  • 15. EMBRACE AI SERVICES IN AWS EXTEND WITH CFML THE SOLUTION
  • 17. SORRY, NO IAM MY USUAL CAVEAT
  • 18. WHAT ARE STEP FUNCTIONS? WHAT ARE STEP FUNCTIONS?
  • 21. STATE MACHINES WHAT ARE STEP FUNCTIONS?
  • 22. WHAT DOES STATE–BASED WORKFLOW LOOK LIKE? WHAT ARE STEP FUNCTIONS? START DECIDESTEP 1 CHOICE A CHOICE B END
  • 23. VISUAL ORCHESTRATION WHAT ARE STEP FUNCTIONS? Via the AWS Console
  • 24. STATE TYPES TO CHOOSE FROM Task Sequence Parallel Branch Wait Success Failure WHAT ARE STEP FUNCTIONS?
  • 25. SHARE DATA BETWEEN STEPS Must be expressed in JSON Traverse with JSONPath pathing ( https://github.com/json-path/JsonPath ) Reference path: $.someVariableName InputPath = filter selection of current state’s raw input to go into task (function) ResultPath = reference path to data coming out of task (function) OutputPath = filter selection of current task (function) result, to serve as input for next state WHAT ARE STEP FUNCTIONS?
  • 26. BUILD AND VALIDATE STATE MACHINES IN THE AWS CONSOLE Not using the console? Use statelint
 
 https://github.com/awslabs/statelint
 WHAT ARE STEP FUNCTIONS?
  • 27. EXAMPLE WORKFLOW: DESCRIBE AN IMAGE LAMBDA S3 REKOGNITION CFML! EXAMPLE 1
  • 28. STATE TYPES IN THE EXAMPLE Task Choice Pass Fail Succeed EXAMPLE 1: DESCRIBING AN IMAGE
  • 29. WORKFLOW OVERVIEW EXAMPLE 1: DESCRIBING AN IMAGE START IS <=50? GENERATE RANDOM NUMBER USE IMAGE 1 USE IMAGE 2 DETECT LABELS
  • 31. TASK STATES "States": { "generateRandomNumber": { "Type": "Task", "Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:generateRandomNumber", "ResultPath": "$.randomNumber", "Next": "ChoiceState" }, EXAMPLE 1: DESCRIBING AN IMAGE
  • 32. HOW DOES LAMBDA WORK? EXAMPLE 1: DESCRIBING AN IMAGE <1.5GB RAM < 5 minutes }
  • 33. WRITING CODE FOR LAMBDA Upload a ZIP containing source and dependencies Must zip the folder contents, not the containing folder 50MB size limit Point to a ZIP on S3 Code using Cloud9 Editor in the console EXAMPLE 1: DESCRIBING AN IMAGE
  • 34. GENERATE RANDOM NUMBER FUNCTION exports.handler = (event, context, callback) => { var min = event.min ? event.min : 1; var max = event.max ? event.max : 100; var result = Math.floor(Math.random() * (max - min)) + min; callback(null, result); }; EXAMPLE 1: DESCRIBING AN IMAGE
  • 35. TASK STATES "States": { "generateRandomNumber": { "Type": "Task", "Resource": “arn:aws:lambda:us-east-1:XXXXXXXXXXXX:function:generateRandomNumber", "ResultPath": "$.randomNumber", "Next": "ChoiceState" }, EXAMPLE 1: DESCRIBING AN IMAGE
  • 36. CHOICE STATES "ChoiceState": { "Type" : "Choice", "Choices": [ { "Variable": "$.randomNumber", "NumericLessThanEquals": 50, "Next": "setDataForImageOne" }, { "Variable": "$.randomNumber", "NumericGreaterThan": 50, "Next": "setDataForImageTwo" } ], "Default": "WhyAreWeHereState" EXAMPLE 1: DESCRIBING AN IMAGE
  • 37. COMPARATORS FOR CHOICE STATES StringEquals StringLessThan StringGreaterThan StringLessThanEquals StringGreaterThanEquals NumericEquals NumericLessThan NumericGreaterThan NumericLessThanEquals NumericGreaterThanEquals BooleanEquals TimestampEquals TimestampLessThan TimestampGreaterThan TimestampLessThanEquals TimestampGreaterThanEquals And Or Not EXAMPLE 1: DESCRIBING AN IMAGE
  • 38. CHOICE STATES "ChoiceState": { "Type" : "Choice", "Choices": [ { "Variable": "$.randomNumber", "NumericLessThanEquals": 50, "Next": "setDataForImageOne" }, { "Variable": "$.randomNumber", "NumericGreaterThan": 50, "Next": "setDataForImageTwo" } ], "Default": "WhyAreWeHereState" EXAMPLE 1: DESCRIBING AN IMAGE
  • 39. PASS STATES "setDataForImageOne": { "Type" : "Pass", "Result": { "s3Bucket": "conferencedemobucket", "s3Key": "images/familyFaces.jpg" }, "Next": "getImageLabels" }, “setDataForImageTwo": { "Type" : "Pass", "Result": { "s3Bucket": "conferencedemobucket", "s3Key": "images/dogForLabels.jpg" }, "Next": "getImageLabels" }, EXAMPLE 1: DESCRIBING AN IMAGE
  • 40. REKOGNIZING THE IMAGE "getImageLabels": { "Type" : "Task", "Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:detectLabelsForImage", "Next": "Finish" }, EXAMPLE 1: DESCRIBING AN IMAGE
  • 42. WHAT CAN REKOGNITION DO? DETECT IMAGE ELEMENTS IDENTIFY FACES ANALYZE/MATCH FACES IDENTIFY TEXT EXAMPLE 1: DESCRIBING AN IMAGE
  • 43. DETECT LABELS FOR IMAGE (NODE.JS) var params = { Image: { S3Object: { Bucket: srcBucket, Name: srcKey } }, MaxLabels: 10, MinConfidence: 70 }; rekognition.detectLabels(params) .promise().then(function (data) { data.s3Bucket = srcBucket; data.s3Key = srcKey; callback(null, data); }).catch(function (err) { callback(err); }); EXAMPLE 1: DESCRIBING AN IMAGE
  • 44. WHAT DOES RECOGNITION TELL US? EXAMPLE 1: DESCRIBING AN IMAGE
  • 45. END STATES "WhyAreWeHereState": { "Type": "Fail", "Cause": "We really should not have ended up here from a numeric value decision." }, "Finish": { "Type": "Succeed" } EXAMPLE 1: DESCRIBING AN IMAGE
  • 46. SO WHERE DOES COME IN? EXAMPLE 1: DESCRIBING AN IMAGE
  • 47. IS THE SCHEDULER AND EXECUTOR EXECUTING STEP FUNCTIONS FROM CFML
  • 48. YOUR CFML NEEDS TO: Make an execution request Get the ARN of the execution for follow–up Check on completion If complete, get the results EXECUTING STEP FUNCTIONS FROM CFML
  • 49. USING THE AWS JAVA SDK Add to cfusion/lib: aws-java-sdk-1.11.xxx.jar jackson-annotations-2.6.0.jar jackson-core-2.6.7.jar jackson-databind-2.6.7.1.jar joda-time-2.8.1.jar EXECUTING STEP FUNCTIONS FROM CFML
  • 50. MAKE AN EXECUTION REQUEST arnOfFunctionToInvoke = “arn:aws:states:us- east-1:XXXXXXXXX:stateMachine:confDemoSimpleDecisionMachine” executionRequest = CreateObject('java', ‘com.amazonaws.services.stepfunctions.model.StartExecutionRequest').init(); executionRequest.setStateMachineArn(arnOfFunctionToInvoke); executionResult = stepFunctionService.StartExecution(executionRequest); EXECUTING STEP FUNCTIONS FROM CFML
  • 51. GET ARN OF EXECUTION executionResult = stepFunctionService.StartExecution(executionRequest); executionARN = executionResult.getExecutionARN(); EXECUTING STEP FUNCTIONS FROM CFML
  • 52. CHECK ON COMPLETION describeExecutionRequest = CreateObject('java', ‘com.amazonaws.services.stepfunctions.model.DescribeExecutionRequest').init(); describeExecutionRequest.setExecutionArn(executionARN); executionResult = stepFunctionService.describeExecution(describeExecutionRequest); EXECUTING STEP FUNCTIONS FROM CFML
  • 53. IF COMPLETE, GET THE RESULTS stepFunctionResult.status = executionResult.getStatus(); if (stepFunctionResult.status IS ‘SUCCEEDED’) { stepFunctionResult.finishedOn = executionResult.getStopDate(); stepFunctionResult.output = DeserializeJSON(executionResult.getOutput()); } EXECUTING STEP FUNCTIONS FROM CFML
  • 54. ASYNCHRONOUS STATUS CHECKING Scheduled task Persist execution ARNs EXECUTING STEP FUNCTIONS FROM CFML
  • 55. EXAMPLE WORKFLOW: TRANSCRIBE AND TRANSLATE A VIDEO LAMBDA POLLY EXAMPLE 2 TRANSCRIBE TRANSLATE
  • 56. WHY IS THIS USEFUL? ACCESSIBILITY EFFICIENCY UTILITY INTERNATIONALIZATION EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 57. NEW STATE TYPES IN THE EXAMPLE Task with Retries Wait Parallel EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 58. EXECUTION DIAGRAM Wait loop Parallel execution EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 59. WORKFLOW OVERVIEW EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK START TRANSCRIBE END TRANSLATE ES TRANSLATE FR TRANSLATE DE SPEAK ES SPEAK FR SPEAK DE
  • 60. THROTTLING EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 61. RETRIES ARE KEY TO HANDLING THROTTLED SERVICES EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 62. KICKOFF TASK "transcribeMP4": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:XXXXXXXXX:function:cfdemoStartTranscribeJob", "Next": "WaitForTranscriptionComplete", "Retry": [ { "ErrorEquals": [ "States.ALL" ], "IntervalSeconds": 30, "MaxAttempts": 3, "BackoffRate": 10 } ] } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 63. TRANSCRIBE EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 64. AWS TRANSCRIBE Accepts MP4, MP3, WAV, FLAC Understands English (US), Spanish (US) Transcriptions with punctuation Recognizes multiple speakers Timestamp each word Supports custom vocabulary for discipline–specific words $0.0004 per second 60 minutes free per month EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 65. START TRANSCRIPTION JOB TASK var returnData = { jobName: event.jobName } var params = { LanguageCode: 'en-US', Media: { MediaFileUri: event.srcFile }, MediaFormat: event.mediaType, TranscriptionJobName: event.jobName } Transcribe.startTranscriptionJob(params, function(err, data) { if (err) { console.log(err, err.stack); callback(err, null) } else { console.log(data); // successful response callback(null, returnData); } }); EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 66. HOW DO WE HANDLE FULLY ASYNCHRONOUS TASKS? EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 67. LOOPING IN A STEP FUNCTION CAPLINE HEADER ELEMENT Wait Check job status Job status done? EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 68. LOOPING IN STEP FUNCTIONS "WaitForTranscriptionComplete": { "Type": "Wait", "Seconds": 30, "Next": "Get Job Status" }, "Get Job Status": { "Type": "Task", "Resource": “arn:aws:lambda:us- east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus", "Next": "Transcript Complete?" }, "Transcript Complete?": { "Type": "Choice", "Choices": [ { "Variable": "$.jobStatus", "StringEquals": "FAILED", "Next": "Transcript Failed" }, { "Variable": "$.jobStatus", "StringEquals": "COMPLETED", "Next": "Get Transcription File" } ], "Default": "WaitForTranscriptionComplete" } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 69. WAIT STATES Seconds Timestamp Expiration date Timestamp path (variable) "TimestampPath": "$.expirationdate" EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 70. LOOPING IN STEP FUNCTIONS "WaitForTranscriptionComplete": { "Type": "Wait", "Seconds": 30, "Next": "Get Job Status" }, "Get Job Status": { "Type": "Task", "Resource": “arn:aws:lambda:us- east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus", "Next": "Transcript Complete?" }, "Transcript Complete?": { "Type": "Choice", "Choices": [ { "Variable": "$.jobStatus", "StringEquals": "FAILED", "Next": "Transcript Failed" }, { "Variable": "$.jobStatus", "StringEquals": "COMPLETED", "Next": "Get Transcription File" } ], "Default": "WaitForTranscriptionComplete" } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 71. CHECKING THE JOB STATUS var params = { TranscriptionJobName: jobName } var request = Transcribe.getTranscriptionJob(params, function(err, data) { if (err) { // an error occurred callback(err, null); } else { // successful response, return job status var returnData = { jobName: jobName, jobStatus: data.TranscriptionJob.TranscriptionJobStatus, transcriptFileUri: data.TranscriptionJob.Transcript.TranscriptFileUri, transcriptFileName: jobName }; callback(null, returnData); } }); EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 72. LOOPING IN STEP FUNCTIONS "WaitForTranscriptionComplete": { "Type": "Wait", "Seconds": 30, "Next": "Get Job Status" }, "Get Job Status": { "Type": "Task", "Resource": “arn:aws:lambda:us- east-1:XXXXXXXX:function:cfdemoCheckTranscribeJobStatus", "Next": "Transcript Complete?" }, "Transcript Complete?": { "Type": "Choice", "Choices": [ { "Variable": "$.jobStatus", "StringEquals": "FAILED", "Next": "Transcript Failed" }, { "Variable": "$.jobStatus", "StringEquals": "COMPLETED", "Next": "Get Transcription File" } ], "Default": "WaitForTranscriptionComplete" } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 73. GETTING THE TRANSCRIPTION RESULT Transcript does not go into a bucket you own! Time limited URI returned from getTranscriptionJob() "TranscriptFileUri": “https://s3.amazonaws.com/aws-transcribe-us-east-1-prod/683830609677/ confDemo-1523559305156/asrOutput.json?X-Amz-Security- Token=FQoDYXdzEEoaDFIZWqjw%2FgCc3kQGWSK3A43rTlruH70hezLPxIDyUEk%2Fk9Ga%2F6 eRg7Hwpe5WpMoQQ0it…” Token is tied to account that generated the Transcribe job Grab and move to S3 for future use EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 74. SAVING THE TRANSCRIBE OUTPUT getTranscript(transcriptFileUri).then(function(getTranscriptResponse) { return writeTranscriptToS3(getTranscriptResponse,transcriptFileName); }).then(function(filePathOnS3) { var returnData = { transcriptFilePathOnS3: filePathOnS3, transcriptFileName: transcriptFileName }; callback(null, returnData); }).catch(function(err) { callback(err, null); }) EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 75. PROMISE ALL THE THINGS! function getTranscript(transcriptFileUri) { return new Promise(function(resolve, reject) { https.get(transcriptFileUri, res => { res.setEncoding("utf8"); let body = ""; res.on("data", data => { body += data; }); res.on("end", () => { body = JSON.parse(body); let transcript = body.results.transcripts[0].transcript; resolve(transcript); }); res.on("error", (err) => { reject(Error(err)); }); }); }); function writeTranscriptToS3(transcript,transcriptFileName) { return new Promise(function(resolve, reject) { let filePathOnS3 = 'transcripts/' + transcriptFileName + '.txt'; var params = { Bucket: 'conferencedemobucket', Key: filePathOnS3, Body: transcript }; var putObjectPromise = S3.putObject(params).promise(); putObjectPromise.then(function(data) { resolve(filePathOnS3); }).catch(function(err) { reject(Error(err)); }); }); } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 76. EXECUTION DIAGRAM Wait loop Parallel execution EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 77. PARALLEL TASKS Significantly speed workflow execution Cannot be dynamically generated EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 78. PARALLEL TASKS "Make Versions": { "Type": "Parallel", "Next": "Workflow Complete", "Branches": [ { "StartAt": "makeSpanishStart", "States": { "makeSpanishStart": {}, "makeSpanishText": {}, "makeSpanishAudioFile": {} }, // end branch { "StartAt": “makeFrenchStart", "States": { { "makeFrenchStart": {}, "makeFrenchText": {}, "makeFrenchAudioFile": {} }, // end branch ] } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK Parallel Branch 1 Parallel Branch 2
  • 79. STEPS IN EACH PARALLEL TASK Define which language to use (Pass) Translate text (Task) Prep translated text for speech (Task) Speak translated text (Task) EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 80. DEFINE WHAT LANGUAGE TO USE "makeSpanishStart": { "Type": "Pass", "Result": "es", "ResultPath": "$.languageToUse", "Next": "makeSpanishText" }, EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 81. TRANSLATE ENGLISH TEXT "makeSpanishText": { "Type": "Task", "Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:cfdemoTranslateText", "Next": "prepSpanishVoiceOutput", "Retry": [ { "ErrorEquals": [ "States.ALL" ], "IntervalSeconds": 60, "MaxAttempts": 3, "BackoffRate": 5 } ] } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 82. TRANSLATE EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 83. AWS TRANSLATE To/from English only Arabic (ar) Chinese (Simplified) (zh) French (fr) German (de) Portuguese (pt) Spanish (es) Limit of 5000 characters per 10 seconds $15 per million characters 2 million characters free per month EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 84. TRANSLATING TEXT getTranscriptFile(transcriptFileOnS3).then(function(getTranscriptResponse) { return translateText(getTranscriptResponse, languageToUse); }).then(function(translatedTextObj) { var returnData = { translatedText: translatedTextObj.TranslatedText, languageOfText: languageToUse, sourceTranscriptFileName: sourceTranscriptFileName } callback(null, returnData); }).catch(function(err) { callback(err, null); }) EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 85. TRANSLATING TEXT function translateText(textToTranslate, languageToUse) { return new Promise(function(resolve, reject) { // Current maximum length for translation of 5000 chars var maxLength = 4500; var trimmedString = textToTranslate.substr(0, maxLength); // We don't want to pass in words that are cut off trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" "))); var params = { SourceLanguageCode: 'en', TargetLanguageCode: languageToUse, Text: trimmedString }; Translate.translateText(params, function(err, data) { if (err) { reject(Error(err)); } else { console.log("Successful translation:n"); resolve(data); } }); }); } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 86. TRANSLATE ENGLISH TEXT "makeSpanishText": { "Type": "Task", "Resource": “arn:aws:lambda:us-east-1:XXXXXXXX:function:cfdemoTranslateText", "Next": "prepSpanishVoiceOutput", "Retry": [ { "ErrorEquals": [ "States.ALL" ], "IntervalSeconds": 60, "MaxAttempts": 3, "BackoffRate": 5 } ] } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 87. PREPARING THE TRANSLATED TEXT FOR SPEECH "prepSpanishVoiceOutput": { "Type": "Task", "Resource": “arn:aws:lambda:us-east-1:XXX:function:cfDemoPrepTranslatedTextForSpeech", "Next": "makeSpanishAudioFile" } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 88. VARIABLE REASSIGNMENT IN STEP FUNCTIONS IS A PAIN EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 89. REASSIGNING VARIABLES exports.handler = (event, context, callback) => { var textToSpeak = event.translatedText; var languageOfText = event.languageOfText; var transcriptFileName = event.sourceTranscriptFileName; var returnData = { textToSpeak: textToSpeak, languageOfText: languageOfText, transcriptFileName: transcriptFileName } callback(null, returnData); }; EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 90. TURNING TEXT INTO SPEECH "makeSpanishAudioFile": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:XXXXXXX:function:cfDemoConvertTextToSpeech", "Retry": [ { "ErrorEquals": [ "States.ALL" ], "IntervalSeconds": 60, "MaxAttempts": 3, "BackoffRate": 5 } ], "End": true } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 91. POLLY EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 92. AWS POLLY Male and female voices in Danish Dutch English (AU, GB, GB-WLS, IN, US) French (FR, FR-CA) German Icelandic Italian Japanese Korean Norweigan Polish Portuguese (BR, PT) Romanian Russian Spanish (ES, US) Swedish Turkish Welsh Limit of 100 requests per second $4 per 1 million characters for speech 5 million characters free per month EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 93. TURNING TEXT INTO SPEECH makeMP3FromText(textToSpeak, languageOfText).then(function(makeMP3Result) { return writeFileToS3(makeMP3Result.AudioStream, languageOfText, fileNameForOutput); }).then(function(mp3FileNameOnS3) { var returnData = {}; returnData["mp3FileNameOnS3-"+languageOfText] = mp3FileNameOnS3 callback(null, returnData); }).catch(function(err) { callback(err, null); }) EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 94. TURNING TEXT INTO SPEECH function makeMP3FromText(textToSpeak, languageOfText) { return new Promise(function(resolve, reject) { var voiceToUse = 'Ivy'; // Polly has a current maximum character length of 3000 characters var maxLength = 2900; var trimmedText = textToSpeak.substr(0, maxLength); switch(languageOfText) { case 'es': voiceToUse = (Math.random() >= 0.5) ? "Penelope" : “Miguel"; break; case 'fr': voiceToUse = (Math.random() >= 0.5) ? "Celine" : “Mathieu"; break; case 'de': voiceToUse = (Math.random() >= 0.5) ? "Vicki" : “Hans"; break; } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 95. TURNING TEXT INTO SPEECH var params = { OutputFormat: "mp3", SampleRate: "8000", Text: trimmedText, VoiceId: voiceToUse } var speakPromise = Polly.synthesizeSpeech(params).promise(); speakPromise.then(function(data) { // successfully created MP3 stream resolve(data); }).catch(function(err) { reject(Error(err)); }); EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 96. TURNING TEXT INTO SPEECH "makeSpanishAudioFile": { "Type": "Task", "Resource": "arn:aws:lambda:us-east-1:XXXXXXX:function:cfDemoConvertTextToSpeech", "Retry": [ { "ErrorEquals": [ "States.ALL" ], "IntervalSeconds": 60, "MaxAttempts": 3, "BackoffRate": 5 } ], "End": true } EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 97. EXECUTION DIAGRAM Wait loop Parallel execution EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 98. SO WHERE DOES COME IN? EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 99. IS THE SCHEDULER AND EXECUTOR EXECUTING STEP FUNCTIONS FROM CFML
  • 100. YOUR CFML NEEDS TO: Make an execution request Get the ARN of the execution for follow–up Check on completion If complete, get the results CF2018: Futures? EXECUTING STEP FUNCTIONS FROM CFML
  • 101. 3 DAYS EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK
  • 102. PRODUCTION IMPROVEMENTS Improved handling of service limitations Logical chunking / chunk stitching Search video via Elasticsearch EXAMPLE 2: TRANSCRIBE, TRANSLATE, AND SPEAK