This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment": "Transcribe an object uploded to S£", | |
"StartAt": "transcribe", | |
"States": { | |
"transcribe": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::lambda:invoke", | |
"Parameters": { | |
"FunctionName": "arn:aws:lambda:region:account_id:function:transcribeS3ObjOnUpload:$LATEST", | |
"Payload": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const https = require('https'); | |
var assert = require('assert'); | |
exports.handler = async (event) => { | |
// required params | |
var region = 'put ypur region'; | |
var payload = event['Input']['Payload'] | |
var transcriptFileUri = payload['TranscriptFileUri']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"transcribe-complete":{ | |
"Type":"Choice", | |
"Choices":[ | |
{ | |
"Variable":"$.Payload.TranscriptionJobStatus", | |
"StringEquals":"COMPLETED", | |
"Next":"success" | |
}, | |
{ | |
"Variable":"$.Payload.TranscriptionJobStatus", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
transcribe = boto3.client('transcribe') | |
def lambda_handler(event, context): | |
payload = event['Input']['Payload'] | |
transcriptionJobName = payload['TranscriptionJobName'] | |
userEmail = payload['Email'] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
exports.handler = async (event) => { | |
var region = 'put your region'; | |
var s3bucket = event['Input']['Bucket']; | |
var s3object = event['Input']['Key']; | |
const transcribe = new AWS.TranscribeService(region); | |
const s3 = new AWS.S3(region); | |