-
-
Notifications
You must be signed in to change notification settings - Fork 47
Command Line Tools
In order to provide the below CLI tools access to your Lambda function, you'll need to set up a user in the Identity and Access Manager (IAM).
- Go to the Users section.
- Click
Add User
. - Give your user a name (it doesn't matter what, this is just used to identify it in IAM).
- Select both options under
Access Type
(Programmatic access, AWS Management Console access). - In the permissions section, select
Attach existing policies directly
. - Select
AWSLambdaFullAccess
. - Review and create user.
- install
aws cli
usingpip install awscli --upgrade --user
(Linux) - Make sure an IAM user is created and has access to AWS services.
- Configure
aws-cli
usingaws configure
. See here for help. We use regionus-east-1
- Finally, run
python deploy_tools.py -p -f BostonData
. If everything runs well, you should see the following message:
Updating/uploading lambda code
<a bunch of text>
TRACINGCONFIG PassThrough
VPCCONFIG
DONE UPLOADING...
Note: The exact output text is dependent on your AWS CLI configuration, but if you see
DONE UPLOADING
you should be ok.
Note for users of Windows CMD shell:
After installing awscli as above using pip, your system may not find aws when you run aws configure because aws is not in the existing path. If you find this is the case, uninstall awscli and re-install it without the --user switch.
pip uninstall awscli pip install awscli --upgrade
BostonInfo uses ASK CLI to programmatically upload and build the interaction model with deploy_tools.py
. This just automates the upload/build functions we've accessed through the Alexa skills console in the past.
To install the Amazon Skills Kit (ASK) command line interface, follow these instructions: https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html
Prerequisites:
- You'll need to have Node.js installed.
- [optional] If you'd like to use a version manager for Node, Node Version Manager (NVM) is a popular choice. They don't support Windows, but do list some Windows alternatives in the ReadMe.
- Node Package Manager (NPM) will be installed with Node and you will use this to install ASK CLI.
- You'll also need to create a user in Amazon's Identity and Access Manager (IAM). This provides ASK CLI access to your Alexa skills.
Note: Make sure your version of ASK CLI is up to date. As of this writing (8.31.18), we are using ASK 1.4.2.
Note for users of Windows CMD shell:
When installing Amazon Skills Kit Command Line Interface, Windows CMD shell users may receive this message: MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\Users\Ali\AppData\Roaming\npm\node_modules\ask-cli\node_modu les\dtrace-provider\build\binding.sln]
If you receive the above MSBUILD message, installing windows-build-tools could be a quick fix for the issue. Installing windows-build-tools also installs Python v2.7, but does not change the default Python version.
npm install -g --production windows-build-tools
Then, try installing the Amazon Skills Kit Command line Interface again.