Lambda Setup - gscooke/AlexaNissanLeaf GitHub Wiki

Setup Lambda Function

The application that runs when you make a skill request runs on AWS Lambda. At this time, AWS Lambda is free to use within certain limits which do not expire. This skill should not go anywhere near broaching those limits, but no guarantees.

Open the AWS Management Console. The link will vary depending on your region, so this is for the default US-East-1 (N. Virginia):

You can change your region by selecting the N.Virginia dropdown at the top right of the browser. Not all regions support the free tier, but EU-Ireland does. You should try to use the region closest to you.

Search for the Lambda service by typing Lambda into the search box and clicking on the result. That should take you to the Lambda console:

Select the 'Create a function' option and on the following screen, Author from scratch should be selected. Select the following options:

  1. Name - Select a suitable name, such as myElectricCar or myNissanLeaf
  2. Runtime - Select Node.js 6.10
  3. Role - Select Create new role from template(s).
  4. Role name - Enter a suitable role name, such as myElectricCarRole or myNissanLeafRole
  5. Policy templates - Select Basic Edge Lambda permissions

Click 'Create function'

Configure the function

Scroll down to the Function code box, and in the Code entry type dropdown, select Upload a .Zip file, click the upload button and upload a copy of the file included in this repository.

Click Save

If all has gone well, the function will now be saved and ready for configuration. If you can't see three files listed in the Function Code editor after the save has finished, refresh the page.

After this, scroll to the top of the page and copy the ARN value (e.g. arn:aws:lambda:us-east-1:123123123123:function:myElectricCar) and copy it, you'll need this value for your alexa skill.

The rest of the configuration can happen later once you've got some more values