Using DynamoDB step by step
Application Type
Traditional Web


I am trying to build an application that shows data stored in DynamoDB in a data table, then when clicked take the user through to the item to allow them to edit it and submit the change. 

I've followed the documentation on the connector and the below video, but being new to Outsystems I am struggling to get anything working. Is there a step-by-step guide to help me do this?

Thanks in advance! 

Hi Adrian, thanks for posting the question in the forums (assuming you are the same Adrian Woodrup as the person who commented on the video)

Let me try to help you:

  1. Most important thing is that the way we fetch data is different from a relational model approach. This means that you need to understand the business requirements before even starting to create a table. A bit more on this in this video.
  2. In order to query data in DynamoDB you have to always give the Partition Key and/or Sort Key. Eg: in the video, the partition key is the RequestKey attribute and we don't have a sort key; so we only need to give the name of the partition key.
  3. If you want to return all the data in a table you'll have to use the Scan method which is very resource intensive.
  4. The Query method is best in terms of performance but it always needs the Partition Key and its value. That's why the recorded session in #1 is so important to understand.

For a more concrete example:

Let's say you have a table with all your music collection (which is the get started example in the AWS documentation).

You create the Music table and the ArtistName as the Partition Key for that table.

If you want to get all your music, you use the Scan method (which again, is very resource intensive).

If you want to get the music from Artist Z, you use the Query method. Something along these lines:

  • KeyConditionExpression- "ArtistName = :a" 
    • PartitionKey is ArtistName and we are saying that this key will equal the value in ":a"
  • ExpressionAttributeValues- {":a", {"S": "Elton John"}}
    • :a is Elton John, meaning we want all music where the artist is Elton John

Here's the documentation on how to use the inputs for the Query method:

To get a specific record/row from a table, you'll need to use the Item_Get action in the DynamoDBConnector. The Key input parameter should be the result of a JSON Serialize of the helper structures. So for example, if you want to return the Song "Another one Bites the Dust" you'll want to do something like this:

I'm pretty sure you'll have more questions, I just want to keep it simple for now.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.