In this series of articles, we shared some hands-on experience on how to use the AWS Lambda, learn to design and build a Serverless function to trigger Bitrise builds with Bitrise API via the custom Lambda function.
Alexa for Bitrise CI/CD: Introduction to serverless with AWS Lambda and Bitrise API - Part 1
Alexa for Bitrise CI/CD: Introduction to Amazon Alexa and Alexa Skills - Part 2
Alexa for Bitrise CI/CD: Putting it all together - Part 3
As we know AWS Lambda function needs to be triggered by any supported triggers. Because of this, we will use Alexa and Alexa Skill Kit (ASK) to trigger the function. Inside the function, we will add our logic to receive the voice command from Alexa and pass it to Bitrise API using the POST endpoint to trigger a new build in our Bitrise app. Then, we will get the response from Lambda to the Alexa as a JSON output.
- AWS Free Tier account
- IDE such as VS Code or IntelliJ IDEA
- NodeJS and npm
- AWS CLI and configure it with your AWS Account
- An Amazon developer account: If you already have an Amazon.com account, but not an Amazon developer account, you have the option to use your Amazon.com account as a developer account.
- Alexa Skills Kit Command Line Interface (ASK CLI): A tool for you to manage your Alexa skills and related resources, such as AWS Lambda functions.
- Git
- AWS IAM user
- Clone the repository
- Inside the project, run the following command
npm install
- We need to zip the project to be able to upload it to the AWS Lambda function by the following command (Don’t worry about the API Key and App Slug because we can use Lambda Environment variables to replace the hardcoded values)
zip -r LambdaBitrise.zip index.js node_modules
- In Lambda function, click on the Configuration tab to add the Environment variables:
- APP_SLUG
- API_KEY