2.
Add the Alexa Smart Home Skill ID (Wi-Fi Smart Device Smart Home Skill) from
Fi Smart Device Smart Home Skill Setup
EventSourceToken
.
CloudFormationLambdaTriggerSmartHomeSkill:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName: !Ref CloudFormationLambdaforAlexaSmartHome
Principal: 'alexa-connectedhome.amazon.com'
EventSourceToken: 'amzn1.ask.skill.1d6f1f85-bf71-4340-8930-cdexxxxxxxxxx'
3.
Add the Alexa Custom Skill ID (Wi-Fi Sensor Board Skill) from
7.2 Microchip Wi-Fi Sensor Board
in the argument
EventSourceToken
.
CloudFormationLambdaTriggerCustomSkill:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName: !Ref CloudFormationLambdaforAlexaCustom
Principal: 'alexa-appkit.amazon.com'
EventSourceToken: 'amzn1.ask.skill.1d6f1f85-bf71-4340-8930-cxxxxxxxxxxxx'
4.
Save the file after modification.
5.
Open Command Prompt and go to the
\cloud-formation-templates\
directory. Run the
command:
aws s3 mb s3://<YOUR BUCKET NAME> --profile ZTUser
.
Note:
Ensure that the bucket name must be unique across all existing bucket names in Amazon
S3 and must not contain uppercase or space characters.
Figure 10-11. Console Log
6.
Run command:
aws cloudformation package --template-file
createLambdaForAlexa.template.yaml --s3-bucket <YOUR BUCKET NAME> --
output-template-file createLambdaForAlexa.package.yaml
.
Figure 10-12. Console Log
7.
Run command:
aws cloudformation deploy --template-file
createLambdaForAlexa.package.yaml --stack-name createLambdaForAlexa --
capabilities CAPABILITY_NAMED_IAM --profile ZTUser
.
Figure 10-13. Console Log
8.
https://console.aws.amazon.com/cloudformation
to find the Stack “createLambdaForAlexa”.
ATWINC15x0 Smart Device Kit
Appendix C: AWS CloudFormation to Setup Cl...
©
2019 Microchip Technology Inc.
User Guide
DS50002885A-page 82