- Clone sample app:
https://github.com/damianFC/alexa-rubykit
- Install eb (elastic beanstock command line tool)
- Guide:
- Command for osx:
curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python
eb --version
- Run
eb init
- Chose: us-east-1 : US East (N. Virginia)
- Adds your AWS credentials
- Make a application name
- Run
eb create
this will create your environment
- use defaults
- Verify it is up and running by logging into aws console
- Alexa only uses https so next we need to generate ssl certs
##Generating SSL Certs
- In your app
mkdir temp-cert
cd temp-cert
- Generate key
openssl genrsa 2048 > privatekey.pem
- 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`