Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

A. Hanan avatar image
A. Hanan asked

Dynamodb with Python for Alexa Skill Kit

it seems like the only DynamoDB example (score_Keeper) is for NodeJS, did anyone get it to work with python ? is there a sample for full interaction (Add value, query value etc.) ? I looked at the DynamoDB tutorial and it seems to refer to scenario when the DB is not managed on AWS something like this code: dynamodb = boto3.resource('dynamodb', region='us-west-2', endpoint_url="http://localhost:8000") I support instead of endpoint_url we need to use something else and provide the ARN... but i keep getting errors with what ever combination I use :( would appreciate a sample / any tip if you have experience in make this work :) Thanks, Amir.
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

A. Hanan avatar image
A. Hanan answered
I made some progress and was able to write to the DynamoDB table I creates :) now I can only add value to the primary key I created but I can't seem to add data... What's the correct syntax for adding item with all kinds of fields? The following seems to work: client = boto3.client('dynamodb') client.put_item(TableName='Test', Item={'someSTR':{'S':'Banana'}}) now I want to add something like data and include some fields in it: for instance: Data:{ 'username': 'johndoe', 'first_name': 'John', 'last_name': 'Doe', 'account_type': 'standard_user', } how do I add it to the pit_item command properly? Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered
Hi A. Hanan, You might have additional luck in via the AWS forums and documentation for this, as it's much more generalized to integrating DynamoDB via Python. https://forums.aws.amazon.com/index.jspa http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TicTacToe.html http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.Python.html Hope this helps! Justin
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.