Menu
Lumberyard
Developer Guide (Version 1.12)

DynamoDB (Database) Nodes

You can use these flow graph nodes to connect your game to Amazon DynamoDB.

AtomicAdd node

Add a number to an attribute in DynamoDB and return the number.


                    AtomicAdd

Inputs

Port Type Description
Add Any Writes the val specified in the Value port to DynamoDB
TableName String The name of the DynamoDB table to which to write
TableKeyName String The key name used in the table
Key String Specifies the key to which to write
Attribute String Specfies the attribute to which to write
Value Integer Specifes the value to write

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
NewValue String The value of the attribute after the addition.

This is an atomic operation. You do not need to create the attribute before you use it.

DeleteItem node

Deletes a record in DynamoDB.


                    DeleteItem

Inputs

Port Type Description
DeleteItem Any Deletes the specified item from DynamoDB.
TableName String The name of the DynamoDB table from which to delete
TableKeyName String The key name used in the table
KeyValue String Specifies the key to delete

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
DeletedItems Any Activated when matches were found to delete
NoResults Any No matching results were found

GetItem node

Gets values from DynamoDB.


                    GetItem

Inputs

Port Type Description
GetItem Any Retrieves the item specified from DynamoDB
TableName String The name of the DynamoDB table from which to read
TableKeyName String The key name used in the table
KeyValue String Specifies the key to read
AttributeToReturn String Specfies the attribute to read

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
DataOut String String data that was read from DynamoDB
NumberOut String Number data that was read from DynamoDB
BoolOut String Boolean value that was read from DynamoDB
NoResults Any No matching results were found for the table, key, and attribute specified

PutItem node

Writes values to DynamoDB.


                    PutItem

Inputs

Port Type Description
PutItem Any Writes the item specified to DynamoDB
TableName String The name of the DynamoDB table to which to write
TableKeyName String The key name used in the table
KeyValue String Specifies the key to write
AttributeToWrite String Specfies the attribute to write
DataIn String The data to write
DataType String The data type that the data will be written as
KeyMustNotExist Boolean When true, specifies that the key must not already exist; the default is true. Setting this to false allows you to overwrite an existing key in the table, including all of its existing attributes, and replace them with the new key and attribute values.

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
KeyAlreadyExists Any The key already exists; no change was made

Query node

Queries values in DynamoDB.


                    Query

Inputs

Port Type Description
Query Any Queries table data in DynamoDB
TableName String The name of the DynamoDB table to query
TableKeyName String The name of the table key to query
KeyValue String The value of the key to query
AttributeToCheck String The attribute to query
AttributeComparisonType String The comparison type to make against the attribute; the default is EQUALS. Other possible values are GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS.
AttributeComparisonValue String The value to compare against the attribute
AttributeComparisonValueType String The data type of AttributeComparisonValue (string, bool, or number); the default is string

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
MatchFound Any A match was found
NoMatch Any No match was found

ScanTable node

Scans for entries which pass a comparison test in DynamoDB.


                    ScanTable

Inputs

Port Type Description
Scan Any Scans for matches in DynamoDB table data using the specified attributes
TableName String The name of the DynamoDB table to scan
Attribute String The attribute to query for
AttributeComparisonType String The comparison type to make against the attribute; this defaults to EQUALS.
AttributeComparisonValue String The value to compare against the attribute
AttributeComparisonValueType String The data type of AttributeComparisonValue (string, bool, or number); the default is string

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
MatchesFound Any The number of matches found on a successful scan

UpdateItem node

Updates attribute values of an existing item in DynamoDB.


                    UpdateItem

Inputs

Port Type Description
UpdateItem Any Updates an item in DynamoDB
TableName String The name of the DynamoDB table to use
TableKeyName String The name of the key in the table
KeyValue String The value of the key to write
AttributeToWrite String The attribute to write to
DataIn String The data to write
DataType String The data type to write the data as
KeyMustExist Boolean True if the key specified must already exist in the table; the default is true.
AttributeMustExist Boolean True if the attribute must exist for the key specified; the default is true

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
ConditionsFailed Any Key or attribute not found (either the KeyMustExist or AttributeMustExist condition failed)

GetStringSet node

Retrieves the members of a string set.


                    GetStringSet

Inputs

Port Type Description
GetItem Any Reads data from DynamoDB
TableName String The name of the DynamoDB table to use
TableKeyName String The name of the key in the table
KeyValue String The value of the key to write
AttributeToWrite String The attribute to write to

Outputs

Port Type Description
Success Any Activated upon a successful operation
Error String Activated upon an error being detected; the value of the port is the error message
DataOut String The data read from DynamoDB. The DataOut port fires once for each member of the set.

The success port indicates that all members of the set have been output.