In this repository we upload AWS Lambda functions that the platform www.flashcardx.co uses/needs
-
texttospeech-middleman: At FlashcardX we use this Lambda function to generate the text to speech audio you get when pressing on the speaker icon in your flashcard: this function is triggered by an origin request event when AWS cloudfront does not have the audio clip cached, the function will make sure the audio exists on S3 before cloudfront tries to fetch it, if the audio does not yet exist, we generate it by calling AWS Polly.
-
Image-compressor: This was an experiment where we wanted a function to compress images when saved to an S3 bucket, this is not running on Production right now, and may have some bugs
- create a .env file in the folder of the function with all the necessary AWS keys. For security we don't commit this file to the repo
npm install
gulp deploy
(for some reason this command does not finish ok the first time we run it, we must run it twice or 3 times in order for it to finish ok)