- Need AWS Account - To host your lambda function
- aws-cli is required
$ npm i
# or
$ yarn
-
1º: Create developer account in Amazon.com
-
2º: Create a security profile on this page and configure:
Allowed Origins
andAllowed return urls
.PS: In the first time, create your security profile. After created, you can take your
ALEXA_CLIENT_ID
andALEXA_CLIENT_SECRET
. -
3º: auth in alexa developer console using =>
sls alexa auth
PS: To any errors, check details.
-
4º: create your skill in the alexa developer console using =>
sls alexa create --name SKILL_NAME --locale pt-BR --type custom
You obtain your
ALEXA_SKILL_ID
.After create, this skill is available in this page
-
5º: deploy your application using =>
sls deploy --stage prd
orsls deploy --stage tst
This stage need to create your
AWS_ENDPOINT_ARN
, you can take yourARN
in aws developer console - lambda page.PS: If you dont see your function, check your
region
at the top right corner. -
6º: Get your
ALEXA_VENDOR_ID
in this page
Run using this example:
export ALEXA_VENDOR_ID="YOUR_ALEXA_VENDOR_ID_HERE"
export ALEXA_CLIENT_ID="YOUR_CLIENT_ID_HERE"
export ALEXA_CLIENT_SECRET="YOUR_CLIENT_SECRET_HERE"
export ALEXA_SKILL_ID="YOUR_SKILL_ID_HERE"
export AWS_ENDPOINT_ARN="YOUR_AWS_ENDPOINT_ARN_HERE" # Example arn:aws:lambda:AWS_REGION:ACCOUNT_ID:function:YOUR_PREFIX-STAGE-FUNCTION_NAME
export AWS_REGION_NAME="YOUR_AWS_REGION_NAME_HERE" # Your region used in AWS account. Example: us-east-1
-
1º: deploy your lambda again (if need use --force) using =>
sls deploy --stage tst
-
2º: deploy your amazon skill using =>
sls alexa build
-
3º: Access amazon alexa developer console and select option
test
in you skill. And changeSkill testing is enabled in
todevelopment
and test in youralexa
or in yourbrowser
using this page.
-
Use
github actions
to deploy usingserverless framework
on merge PR -
Add commit linter