How to fetch device list from my database when linked my skill using LWA in aws lambda?

100 Views Asked by At

I had linked my smart home skill using LWA 'Login with Amazon'. It is working perfectly. My question is how to fetch the device list which is stored in my database. I get the bearer token for each directive call. But I don't know how to use that bearer token to get the device list from my database during Discovery directive.

I have my own smart home app where the user creates account and login to get the device list. User adds a device via my app.

1

There are 1 best solutions below

0
On

For fetching your data from your database assuming you are using AWS RDS you can use the AWS Lambda service.

Try this link: https://aws.amazon.com/blogs/database/query-your-aws-database-from-your-serverless-application/#Step_6._Query[Query your AWS database from your serverless application][1]