-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy
executable file
·28 lines (27 loc) · 1.02 KB
/
deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
source ./credentials
source ./climethods
echo "creating custom vocabulary for transcribe service"
createTranscribeVocabulary
echo "creating IAM Role that allows Lambda to execute functions"
createRole
echo "creating IAM Policy defining access to AWS services"
createPolicy
echo "attaching Policy to Role"
attachPolicy
echo "creating SNS Topic for Transcribe service"
createSnsTopic
echo "subscribing ${TRANSCRIPT_DESTINATION_EMAIL} to SNS Topic"
subscribeSnsTopic
echo "creating transcribeAudio Lambda function"
createTranscribeFunction
echo "creating extractTranscript Lambda function"
createExtractFunction
echo "allowing transcribeAudio to be invoked by S3 event"
addTranscriptPermission
echo "allowing extractTranscript to be invoked by S3 event"
addExtractPermission
echo "subscribing transcribeAudio to audio (mp3, mp4, wav, flac) events in ${AUDIO_SOURCE_S3BUCKET_NAME}"
createTranscriptNotification
echo "subscribing extractTranscript to JSON events in ${TRANSCRIPT_DESTINATION_S3BUCKET_NAME}"
createExtractNotification