Skip to content

Instantly share code, notes, and snippets.

@QuintinAdam
Last active August 29, 2015 14:24
Show Gist options
  • Save QuintinAdam/4fb64f8fc86d91e32467 to your computer and use it in GitHub Desktop.
Save QuintinAdam/4fb64f8fc86d91e32467 to your computer and use it in GitHub Desktop.

Setting up Alexa Ruby

Base Setup

  1. Clone sample app: https://github.com/damianFC/alexa-rubykit
  2. Install eb (elastic beanstock command line tool)
  1. Run eb init
  • Chose: us-east-1 : US East (N. Virginia)
  • Adds your AWS credentials
  • Make a application name
  1. Run eb create this will create your environment
  • use defaults
  1. Verify it is up and running by logging into aws console
  1. Alexa only uses https so next we need to generate ssl certs

##Generating SSL Certs

  1. In your app mkdir temp-cert
  2. cd temp-cert
  3. Generate key openssl genrsa 2048 > privatekey.pem
  4. Generate a certificate request openssl req -new -key privatekey.pem -out csr.pem
  • Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:Utah
    Locality Name (eg, city) []:Salt Lake City
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Hobby
    Organizational Unit Name (eg, section) []:Demo
    Common Name (e.g. server FQDN or YOUR name) []:test-alexa-ruby-dev.elasticbeanstalk.com
    Email Address []:[email protected]
    
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    
5. Generate self signed certificate `openssl x509 -req -days 365 -in csr.pem -signkey privatekey.pem -out server.crt`
6. Upload cert to amazon `aws iam upload-server-certificate --server-certificate-name test-rubykit --certificate-body file://server.crt --private-key file://privatekey.pem`
- install aws command line interface `pip install awscli`

## Beanstock Setup

1. Back on your elastic beanstock you want to go under configurations and load balancer 
- protocol must be https
- Secure listener port is 443
- select your uploaded cert (test-rubykit)  

## Alexa App Setup

1. Create a new echo application
- Endpoint: https://test-alexa-ruby-dev.elasticbeanstalk.com (beanstock address)
2. Add Intent Schema & Sample Utterances
3. Upload self signed cert `cat server.crt`

## Pushing Changes

1. Commit Changes
2. `eb deploy`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment