An AWS Lambda function and Amazon Alexa skill that allows querying Budapest public transport information, even directly from an Amazon Echo device.
Useful Gulp tasks:
gulp build - Rebuilds the output ZIP package (lambda-src/dist.zip) that contains the code of the Lambda function, so it can be manually uploaded to AWS.
gulp build:incremental - Recompiles the TypeScript files and rebuilds the output ZIP package, using the previously downloaded Node modules in the output lambda-src/dist folder.
gulp deploy - Uploads the previously built ZIP pack to AWS.
gulp update - gulp build:incremental + gulp deploy
gulp test - Runs the unit tests on the compiled code.
-
Use the Amazon Web Services Management Console to create a new Lambda function.
- Note the ARN of the newly created function.
- Add the name of the function to the
lambda-src/config/lambda.jsonfile.
-
Use the Amazon Apps & Services Developer Portal to create a new Alexa Skill.
- Use the files in the
skill-assetsfolder to configure the skill. - Add the name and the application ID of your new Alexa skill to the
lambda-src/config/skill.jsonfile.
- Use the files in the
-
Use the Amazon Web Services Management Console to create a new IAM account that has permissions to update the Lambda function you created in Step 1.
- Add the credentials of this IAM account to the
lambda-src/config/aws-credentials.jsonfile.
- Add the credentials of this IAM account to the
-
Install and set up Node.js and Gulp on your developer machine.
-
Run
npm installin thelambda-srcfolder to download the third party dependencies to thelambda-src/node-modulesfolder. -
Run
gulp buildto compile the code,gulp deployto upload it to the Lambda function.
The main entry point of the Lambda function is the handler function in the lambda-src/src/index.ts file.
The Alexa skill handlers are registered in the lambda-src/src/handlers.ts file.
Amazon Web Services Lambda Management Console
Amazon Apps & Services Developer Portal Alexa Skills
This project is maintaned by György Balássy.