Git Product home page Git Product logo

ask-form-template's Introduction

Alexa Form SDK Template

This is the Alexa skill template for ask-form-sdk.

Getting started

Using the template

Use the ASK CLI to Create a new skill with a template-url:

ask new --template-url https://github.com/aws-samples/ask-form-template.git

You are prompted to choose a method to host your skill's backend resources:

  • Alexa-hosted-skills (Do not choose this)
  • AWS with CloudFormation (Choose this to for AWS Lambda with persistence to Amazon DynamoDB)
  • AWS Lambda (Choose this if you want to deploy to AWS Lambda without AWS CloudFormation)

You will then be warned you about downloading an unofficial template.

Input Yes to continue provide a skill name eg. my-survey.

? Choose a method to host your skill's backend resources:  AWS with CloudFormation
[Warn]: CLI is about to download the skill template from unofficial template https://github.com/aws-samples/ask-form-template.git. Please make sure you understand the source code to best protect yourself from malicious usage.
? Would you like to continue download the skill template?  Yes
? Please type in your skill name: my-survey
? Please type in your folder name for the skill project (alphanumeric):  my-survey

Change into your project directory, and list the contents. You will see the template includes a lambda folder with a samples forms folder used to generate skill interaction model, as well as infrastructure to deploy cloud formation if required.

$ cd my-survey
$ tree
.
├── LICENSE.txt
├── README.md
├── ask-resources.json
├── infrastructure
│   └── cfn-deployer
│       └── skill-stack.yaml
├── lambda
│   ├── forms
│   │   └── index.js
│   ├── index.js
│   └── package.json
└── skill-package
    ├── assets
    │   ├── en-US_largeIcon.png
    │   └── en-US_smallIcon.png
    ├── interactionModels
    │   └── custom
    │       └── en-US.json
    └── skill.json

You will then be able to deploy this skill into your AWS account. By default this will be deployed to the us-east-1 region.

  • Update the .ask-resources.json to specify a different region.
$ ask deploy

The default invocation is "my survey". Once your skill is deployed, you can test your skill in the Alexa developer console.

Following is an example conversation.

ask-form-template

Troubleshooting

  • If you are getting the following error during ask deploy, then you already have the dynamo db table created with the name my-survey :
[Error]: The CloudFormation deploy failed for Alexa region "default": AlexaPersistentAttributesTable[AWS::DynamoDB::Table]  DELETE_COMPLETE(Resource deleted. For detailed reasoning, please check the "events" tab in the AWS console for CloudFormation stackId <STACK-ID>)

To resolve this issue you can fo to my-survey/infrastructure/cfn-deployer/skill-stack.yaml and change the name of the PersistentAttributeTableName default value from my-survey.

  • If you are getting the following CLI error during deployment, it might be due to the ask profile settings ;
[Error]: CliError: Skill package src is not found in ask-resources.json.

Go to my-survey/ask-resources.json and check the profile to see if the profile used for deployment is present in this. If not add the profile use for deployment to this file.

ask-form-template's People

Contributors

brightsparc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.