{"id":18729975,"url":"https://github.com/jovotech/jovo-sample-alexa-googleassistant-lambda","last_synced_at":"2025-08-12T09:04:09.224Z","repository":{"id":87061324,"uuid":"481888416","full_name":"jovotech/jovo-sample-alexa-googleassistant-lambda","owner":"jovotech","description":"Alexa Skill \u0026 Google Action code that works on AWS Lambda","archived":true,"fork":false,"pushed_at":"2022-05-02T17:14:37.000Z","size":54,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-04T22:32:27.898Z","etag":null,"topics":["alexa","aws-lambda","google-assistant","serverless"],"latest_commit_sha":null,"homepage":"https://www.jovo.tech","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jovotech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-04-15T08:18:45.000Z","updated_at":"2025-08-02T13:10:01.000Z","dependencies_parsed_at":"2023-09-24T16:57:16.381Z","dependency_job_id":null,"html_url":"https://github.com/jovotech/jovo-sample-alexa-googleassistant-lambda","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"2aa07e434f8bea5b5676220b6a02518e272f03e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jovotech/jovo-sample-alexa-googleassistant-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jovotech%2Fjovo-sample-alexa-googleassistant-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jovotech%2Fjovo-sample-alexa-googleassistant-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jovotech%2Fjovo-sample-alexa-googleassistant-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jovotech%2Fjovo-sample-alexa-googleassistant-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jovotech","download_url":"https://codeload.github.com/jovotech/jovo-sample-alexa-googleassistant-lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jovotech%2Fjovo-sample-alexa-googleassistant-lambda/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269558700,"owners_count":24438138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa","aws-lambda","google-assistant","serverless"],"created_at":"2024-11-07T14:31:27.845Z","updated_at":"2025-08-12T09:04:09.177Z","avatar_url":"https://github.com/jovotech.png","language":"JavaScript","readme":"# Jovo v4 Sample: Alexa Skill \u0026 Google Action on AWS Lambda\n\n[![Jovo Staging and Deployment Deep Dive](https://www.jovo.tech/img/jovo-staging-deep-dive.png)](https://www.youtube.com/watch?v=D4kYbr7Mm2s)\n\n\u003cp\u003e\n\u003ca href=\"https://www.jovo.tech\" target=\"_blank\"\u003eWebsite\u003c/a\u003e -  \u003ca href=\"https://www.jovo.tech/docs\" target=\"_blank\"\u003eDocs\u003c/a\u003e - \u003ca href=\"https://www.jovo.tech/marketplace\" target=\"_blank\"\u003eMarketplace\u003c/a\u003e - \u003ca href=\"https://github.com/jovotech/jovo-v4-template\" target=\"_blank\"\u003eTemplate\u003c/a\u003e   \n\u003c/p\u003e\n\nThis [Jovo `v4`](https://www.jovo.tech) sample app showcases the following features:\n\n- **Platforms**: A single code base that works on both [Alexa](https://www.jovo.tech/marketplace/platform-alexa) and [Google Assistant](https://www.jovo.tech/marketplace/platform-googleassistant).\n- **Staging**: Uses a `dev` stage for local debugging and a `prod` stage that is deployed to [AWS Lambda](https://www.jovo.tech/marketplace/server-lambda). Both stages use different Alexa Skill and Google Action projects.\n- **Deployment**: Uses the [Serverless CLI](https://www.jovo.tech/marketplace/target-serverless) for AWS deployment.\n\nLearn how to get this project up and running in the [getting started](#getting-started) section. The [stages and deployment](#stages-and-deployment) section will help you deploy the project to the platform developer consoles and AWS.\n\nWatch the video here:\n\nhttps://www.youtube.com/watch?v=D4kYbr7Mm2s\n\n## Getting Started\n\nClone this repository and install all dependencies:\n\n```sh\n# Clone project\n$ git clone https://github.com/jovotech/jovo-sample-alexa-googleassistant-lambda.git\n\n# Go to directory\n$ cd jovo-sample-alexa-googleassistant-lambda\n\n# Install dependencies\n$ npm install\n```\n\nThe easiest way test the project code is to install the [Jovo CLI](https://www.jovo.tech/docs/cli) and use the [`run`](https://www.jovo.tech/docs/run-command) command. Learn more in [Jovo getting started docs](https://www.jovo.tech/docs/getting-started).\n\n```sh\n# Install Jovo CLI globally\n$ npm install -g @jovotech/cli\n\n# Run local development server\n$ jovo run\n```\n\nThis will compile the code, run the local development server, and print out your individual [Jovo Webhook URL](https://www.jovo.tech/docs/webhook) that you can then use to access the [Jovo Debugger](https://www.jovo.tech/docs/debugger).\n\nThe Debugger allows you to test your local code without having to create Alexa Skill and Google Action projects in the respective developer consoles. We'll do this in the [stages and deployment](#stages-and-deployment) section below.\n\n## Stages and Deployment\n\nThis project uses the [Jovo staging feature](https://www.jovo.tech/docs/staging) that enables you to use multiple versions of your app, for example for local development and for a live version.\n\nThere are two stages available:\n\n- `dev`: This stage is used for local development\n  - The [`app.dev.ts`](./src/app.dev.ts) [app config](https://www.jovo.tech/docs/app-config) uses a file-based database integration called [FileDb](https://www.jovo.tech/marketplace/db-filedb) and the [Jovo Debugger](https://www.jovo.tech/docs/debugger) for browser-based testing.\n  - It uses the [`server.express.ts`](./src/server.express.ts) file as a local development server using [Express](https://www.jovo.tech/marketplace/server-express).\n- `prod`: This stage is used for the live version deployed to AWS\n  - The [`app.prod.ts`](./src/app.prod.ts) [app config](https://www.jovo.tech/docs/app-config) uses a database integration for [AWS DynamoDB](https://www.jovo.tech/marketplace/db-dynamodb).\n  - It uses the [`server.lambda.ts`](./src/server.lambda.ts) for running the code on [AWS Lambda](https://www.jovo.tech/marketplace/server-lambda).\n  - The [`jovo.project.js`](./jovo.project.js) [project config](https://www.jovo.tech/docs/project-config)\n\nThe [`jovo.project.js`](./jovo.project.js) [project config](https://www.jovo.tech/docs/project-config) uses a `dev` and a `prod` stage for stage specific Alexa Skill and Google Action projects as well.\n\nTo get started, copy the [`.env.example`](./.env.example) file and rename it to `.env`.\n\nLearn more below:\n\n- [Alexa Developer Console](#alexa-developer-console)\n- [Actions on Google Console](#actions-on-google-console)-\n- [AWS](#aws)\n\n### Alexa Developer Console\n\nThis guide will show you how to create two different [Alexa](https://www.jovo.tech/marketplace/platform-alexa) Skill projects in the Alexa Developer Console:\n\n- One for the `dev` stage called `Jovo Sample DEV` using the invocation name `my dev test app`\n- One for the `prod` stage called `Jovo Sample PROD` using the invocation name `my test app`\n\nIt's also possible to stop after creating the `dev` Skill. More on that below.\n\n#### DEV Skill\n\nAs explained in the [Jovo Alexa installation docs](https://www.jovo.tech/marketplace/platform-alexa#installation), first install the ASK CLI and configure it by linking it to your Amazon developer account:\n\n```sh\n# Install ASK CLI globally\n$ npm install -g ask-cli\n\n# Configure ASK profile\n$ ask configure\n```\n\nIf you want to deploy to your `default` ASK profile, you don't need to change anything. If you want to use a different profile, modify the following in your `.env` file (after copying the [`.env.example`](./.env.example) file and renaming it to `.env`):\n\n```\nALEXA_ASK_PROFILE_DEV=default\n```\n\nThe [Alexa Developer Console project](https://www.jovo.tech/marketplace/platform-alexa#alexa-developer-console-project) docs show you in detail how to then deploy the project. Use the following two commands:\n\n```sh\n# Build platform specific files (default stage: dev)\n$ jovo build:platform alexa\n\n# Deploy these files to the Alexa Developer Console\n$ jovo deploy:platform alexa\n```\n\nSince the `.env` does include an empty string for the Alexa Skill ID (for both `dev` and `prod`), a new Skill project will be created during the deployment.\n\n```\nALEXA_SKILL_ID_DEV=\nALEXA_SKILL_ID_PROD=\n```\n\nAfter running the command, the CLI will print out the Skill ID of the newly created project. To keep the deployment linked to this project, copy the ID and add it to the `.env` file.\n\nIf you open the [Alexa Developer Console](https://developer.amazon.com/), you should now see your project named `Jovo Sample DEV` in the list of Alexa Skills. The endpoint should be your [Jovo Webhook URL](https://www.jovo.tech/docs/webhook). You can then open the testing tab and test the app using the invocation \"_my dev test app_\" (the invocation name is a stage specific [model override](https://www.jovo.tech/docs/project-config#models) that is added in the [`jovo.project.js`](./jovo.project.js) file). Make sure that your local development server is running with `jovo run` before you start testing.\n\n#### PROD Skill\n\nThe [`jovo.project.js`](./jovo.project.js) file uses `dev` as `defaultStage`, so if you want to deploy to the `prod` stage, you either need to update that property or add the `--stage` flag to the commands:\n\n```sh\n# Build platform specific files (stage: prod)\n$ jovo build:platform alexa --stage prod\n\n# Deploy these files to the Alexa Developer Console\n$ jovo deploy:platform alexa --stage prod\n```\n\nIf you want to deploy to your `default` ASK profile, you don't need to change anything. If you want to use a different profile, modify the following in your `.env` file (after copying the [`.env.example`](./.env.example) file and renaming it to `.env`):\n\n```\nALEXA_ASK_PROFILE_PROD=default\n```\n\nAfter successful deployment, you should now see your project named `Jovo Sample PROD` in the list of Alexa Skills in the Alexa Developer Console.\n\nWhile the `dev` Alexa Skill uses the [Jovo Webhook](https://www.jovo.tech/docs/webhook) as [`endpoint`](https://www.jovo.tech/docs/project-config#endpoint), the code for the `prod` Skill will be hosted on [AWS](#aws). You need to deploy it and update the following property in your `.env` file:\n\n```\nLAMBDA_ARN_PROD=arn:aws:lambda:us-east-1:111111111111:function:jovo-sample-prod-handler\n```\n\nIt is necessary that you redeploy your Alexa Skill project again after updating the value above.\n\n### Actions on Google Console\n\nThis guide will show you how to create two different [Google Action](https://www.jovo.tech/marketplace/platform-googleassistant) projects in the Actions on Google Console:\n\n- One for the `dev` stage called `Jovo Sample DEV` using the invocation name `my dev test app`\n- One for the `prod` stage called `Jovo Sample PROD` using the invocation name `my test app`\n\nIt's also possible to stop after creating the `dev` Action. More on that below.\n\n#### DEV Action\n\nAs explained in the [Jovo Google Assistant installation docs](https://www.jovo.tech/marketplace/platform-googleassistant#installation), you need to install the `gactions` CLI, ideally by following the [official documentation by Google](https://developers.google.com/assistant/actionssdk/gactions#install_the_gactions_command-line_tool).\n\nThe [Actions on Google Console project](https://www.jovo.tech/marketplace/platform-googleassistant#actions-on-google-console-project) docs show you in detail how to then deploy the project. Since the Google Actions API doesn't allow for programmatic project creation, you need to [access the console](https://console.actions.google.com/) and create a project manually. Learn more in the [official Google Assistant docs](https://developers.google.com/assistant/conversational/build/projects?tool=builder#create_a_project).\n\nThen copy the newly created project ID and add it to your `.env` file (after copying the [`.env.example`](./.env.example) file and renaming it to `.env`):\n\n```\nGOOGLE_ACTION_PROJECT_ID_DEV=\n```\n\nFor now, you only need to fill in the field for the `dev` stage.\n\nYou can then use the following two commands:\n\n```sh\n# Build platform specific files (default stage: dev)\n$ jovo build:platform googleAssistant\n\n# Deploy these files to the Actions on Google Console\n$ jovo deploy:platform googleAssistant\n```\n\nAfter that, you can log see the changes in the Actions on Google console.\n\n#### PROD Action\n\nThe [`jovo.project.js`](./jovo.project.js) file uses `dev` as `defaultStage`, so if you want to deploy to the `prod` stage, you either need to update that property or add the `--stage` flag to the commands:\n\n```sh\n# Build platform specific files (stage: prod)\n$ jovo build:platform googleAssistant --stage prod\n\n# Deploy these files to the Actions on Google Console\n$ jovo deploy:platform googleAssistant --stage prod\n```\n\nFor this to work, you need to create a project in the Actions on Google console as explained in the previous section, copy the newly created project ID and add it to your `.env` file:\n\n```\nGOOGLE_ACTION_PROJECT_ID_PROD=\n```\n\nWhile the `dev` Google Action uses the [Jovo Webhook](https://www.jovo.tech/docs/webhook) as [`endpoint`](https://www.jovo.tech/docs/project-config#endpoint), the code for the `prod` Action will be hosted on [AWS](#aws). You need to deploy it and update the following property in your `.env` file:\n\n```\nLAMBDA_ARN_URL=https://abcdefghijklmnopqrstuvwxyz.lambda-url.us-east-1.on.aws/\n```\n\nIt is necessary that you redeploy your Google Action project again after updating the value above.\n\n### AWS\n\nThis guide will show you how to deploy the `prod` stage of your Jovo app to [AWS Lambda](https://www.jovo.tech/marketplace/server-lambda) using the [Jovo Serverless CLI integration](https://www.jovo.tech/marketplace/target-serverless). The Serverless CLI needs to be installed globally like this:\n\n```sh\n$ npm install -g serverless\n```\n\nLearn more about how to create an AWS account and making the security credentials available to the CLI in the [official Serverless docs](https://www.serverless.com/framework/docs/providers/aws/guide/credentials).\n\nYou can make the keys accessible like this:\n\n```sh\nexport AWS_ACCESS_KEY_ID=\u003cyour-key-here\u003e\nexport AWS_SECRET_ACCESS_KEY=\u003cyour-secret-key-here\u003e\n```\n\nAfter doing so, you can create a `serverless.yaml` file and then bundle and deploy the code using the following commands:\n\n```sh\n# Create serverless.yaml (stage: prod)\n$ jovo build:serverless --stage prod\n\n# Bundle and deploy code to AWS (stage: prod)\n$ jovo deploy:code serverless --stage prod\n```\n\nIf you run into any problems with the deployment, you can also use the following commands instead of `deploy:code serverless`:\n\n```sh\n# Bundle the prod stage source code\n$ npm run bundle:prod\n\n# Use the Serverless CLI for deployment\n$ serverless deploy\n```\n\nLearn more about the `npm` scripts in the [`package.json`](./package.json) file.\n\nAfter successful deployment, you should be able to see the created function in the [AWS Lambda console](https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions). If you did not update the `service` name in `jovo.project.js`, it should be called `jovo-sample-prod-handler`.\n\nIf the deployment doesn't work, it's possibly because the value for the Alexa Skill ID (which is needed for the verification happening in the Alexa Skills Kit Trigger) is undefined in your `.env` file. To get started, you could copy the existing `dev` Alexa SKill ID into the field and swap it out at a later point after creating a `prod` Skill project.\n\n```\nALEXA_SKILL_ID_PROD=\n```\n\nTo get information about your function, you can either open it in the console or run the `serverless info` command. Copy the ARN and add it to your `.env` file. This can then be used to rebuild and deploy your `prod` Alexa Skill with the Lambda function as endpoint.\n\n```\nLAMBDA_ARN_PROD=arn:aws:lambda:us-east-1:111111111111:function:jovo-sample-prod-handler\n```\n\nThe function URL (that was added using the `url: true` parameter in the Serverless config, learn more in the [official Serverless docs](https://www.serverless.com/blog/aws-lambda-function-urls-with-serverless-framework)) is a newly introduced feature by AWS that makes Lambda functions accessible to outside services without the need to add an API Gateway endpoint.\n\nCopy the function URL and add it to your `.env` file. This can then be used to rebuild and deploy your `prod` Google Action with the Lambda function as endpoint.\n\n```\nLAMBDA_URL_PROD=https://abcdefghijklmnopqrstuvwxyz.lambda-url.us-east-1.on.aws/\n```\n\nThe `jovo.project.js` also includes the permissions to create and update a DynamoDb table. By default, the table will be called `jovo-sample-db`. You can also update it in the project config under the `prod` stage:\n\n```js\nnew ServerlessCli({\n  provider: {\n    // ...\n    environment: {\n      DYNAMODB_TABLE_NAME: 'jovo-sample-db',\n    },\n  },\n  // ...\n}),\n```\n\nOn the first request, the Lambda will fail because of the DynamoDb table creation. On the next request, the table should be created and everything should work correctly.\n\n## Next Steps\n\nLearn more about the Jovo app project structure and key concepts in the [Jovo getting started docs](https://www.jovo.tech/docs/getting-started).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjovotech%2Fjovo-sample-alexa-googleassistant-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjovotech%2Fjovo-sample-alexa-googleassistant-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjovotech%2Fjovo-sample-alexa-googleassistant-lambda/lists"}