0
votes

I currently have a custom Alexa skill that is live. The skill writes and reads from a dynamoDB table but I want each user to have their own unique table. Right now all users data gets inputted and read from one single table that is connected to the skill. Is there a way for a new user to automatically create a new unique dynamoDB table when the user launches and uses the skill so that each user can only access their own data?

Thanks in advance!

1

1 Answers

1
votes

I don't understand why you would want each user to have their own exclusive DynamoDB table, but I'll leave that up to you. The use-case you mention should be possible, but note that the limit on the number of DDB tables is 256 per region. Refer to the points below:

  1. In the Lambda function's input event invoked from Alexa, the "userId" parameter can be used to identify each user uniquely. Note: Normally, disabling and re-enabling a skill generates a new identifier.

  2. Using the userId check if a DDB table with the same name exists, if not create a table and continue. If the complete userId cannot be set as the DDB table name, you could use tags.