Building API operations
To use NoSQL Workbench to build DynamoDB CRUD APIs, select Interface-based operations at the top right corner of NoSQL Workbench.
Then go to the Operations drop-down and choose the operation that you want to build.

You can perform the following operations in the operation builder.
Table operations
Delete table
To run or generate code for a Delete Table
operation, do the
following.
-
Select Delete Table from the Operations dropdown list.
-
Select the table from the Table name dropdown list.
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
In the confirmation window that appears, confirm by entering the table name and selecting Delete.
Results of the operation will appear in the results tab at the bottom of the screen.
For more information about this operation, see Delete table in the Amazon DynamoDB API Reference.
Create table
To run or generate code for a Create Table
operation, do the
following.
-
Select Create Table from the Operations dropdown list.
-
Enter the table name desired.
-
Create a partition key.
-
Configure the table as desired. You can create a Global Secondary Index, enable autoscaling, and other options.
-
To customize capacity settings, go to Capacity Settings and uncheck the box next to Default settings.
You can now select either Provisioned or On-demand capacity.
With Provisioned selected, you can set minimum and maximum read and write capacity units. You can also enable or disable auto scaling.
If the table is currently set to OnDemand, you will be unable to specify a provisioned throughput.
If you switch from OnDemand to Provisioned throughput, then Autoscaling will automatically be applied to all GSIs with: min: 1, max: 10; target: 70%.
-
If you want to clear all new settings you've made and start over, select Clear form.
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
Results of the operation will appear in the results tab at the bottom of the screen.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see Create table in the Amazon DynamoDB API Reference.
Update table
To run or generate code for an Update Table
operation, do the
following.
-
Select Update Table from the Operations dropdown list.
-
Select the desired operation from the Update operations dropdown list.
-
Select the table from the Table name dropdown list.
-
Update the selected table as desired. You can create a GSI, update provisioned throughputs and other options.
-
If you select Create GSI, Update Provisioned Throughput or Update Provisioned Throughput for GSI the Capacity settings option will appear.
-
To customize capacity settings, go to Capacity Settings. Then uncheck the option for either Inherit capacity settings from base table or On-demand.
You can now select either Provisioned or On-demand capacity.
With Provisioned selected, you can set minimum and maximum read and write capacity units. You can also enable or disable auto scaling.
If the table is currently set to OnDemand, you will be unable to specify a provisioned throughput.
If you switch from OnDemand to Provisioned throughput, then Autoscaling will automatically be applied to all GSIs with: min: 1, max: 10; target: 70%.
-
If you want to clear the settings you've just entered and start over, Clear form.
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
Results of the operation will appear in the results tab at the bottom of the screen.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see Update table in the Amazon DynamoDB API Reference.
Item operations
Get item
To run or generate code for a Get Item
operation, do the
following.
-
Specify the partition key value.
-
If you want to add a projection expression , do the following:
-
Choose Projection expression.
-
Choose the + (plus sign) next to Projection expression.
-
Specify the Attribute name.
-
-
If you want to generate code, choose Generate code.
Select your desired language from the displayed tabs. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see GetItem in the Amazon DynamoDB API Reference.
Put item
To run or generate code for a Put Item
operation, do the
following.
-
Specify the partition key value.
-
Specify the sort key value, if one exists.
-
If you want to add non-key attributes, do the following:
-
Choose the + (plus sign) next to Other attributes.
-
Specify the Attribute name, Type, and Value.
-
-
If a condition expression must be satisfied for the
Put Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition expressions.
-
-
If you want to generate code, choose Generate code.
Select your desired language from the displayed tabs. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see PutItem in the Amazon DynamoDB API Reference.
Update item
To run or generate code for an Update Item
operation, do the
following:
-
Enter the partition key value.
-
Enter the sort key value, if one exists.
-
In Update expression, choose the expression in the list.
-
Choose the + (plus sign) for the expression.
-
Enter the attribute name and attribute value for the selected expression.
-
If you want to add more expressions, choose another expression in the Update Expression drop-down list, and then select the +.
-
If a condition expression must be satisfied for the
Update Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see UpdateItem in the Amazon DynamoDB API Reference.
Delete item
To run or generate code for a Delete Item
operation, do the
following.
-
Enter the partition key value.
-
Enter the sort key value, if one exists.
-
If a condition expression must be satisfied for the
Delete Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see DeleteItem in the Amazon DynamoDB API Reference.
Query
To run or generate code for a Query
operation, do the
following.
-
Specify the partition key value.
-
If a sort key is needed for the
Query
operation:-
Select Sort key.
-
Specify the comparison operator, attribute type, and attribute value.
-
-
If not all the attributes should be returned with the operation result, select Projection expression.
-
Choose the + (plus sign).
-
Enter the attribute to return with the query result.
-
If more attributes are needed, choose the + .
-
If a condition expression must be satisfied for the
Query
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about this operation, see Query in the Amazon DynamoDB API Reference.
Scan
To run or generate code for a Scan
operation, do the
following.
-
If not all the attributes should be returned with the operation result, select Projection expression.
-
Choose the + (plus sign).
-
Specify the attribute to return with the query result.
-
If more attributes are needed, choose the + again.
-
If a condition expression must be satisfied for the scan operation to succeed, do the following:
-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
TransactGetItems
To run or generate code for a TransactGetItems
operation, do the
following.
-
Choose the + (plus sign).
-
Follow the instructions for the Get item operation.
When you are done specifying the details of the operation, choose the + (plus sign) if you want to add more operations.
To change the order of actions, choose an action in the list on the left side, and then choose the up or down arrows to move it up or down in the list.
To delete an action, choose the action in the list, and then choose the Delete (trash can) icon.
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about transactions, see Amazon DynamoDB transactions.
TransactWriteItems
To run or generate code for a TransactWriteItems
operation, do
the following.
-
In the Actions drop-down list, choose the operation that you want.
-
For
DeleteItem
, follow the instructions for the Delete item operation. -
For
PutItem
, follow the instructions for the Put item operation. -
For
UpdateItem
, follow the instructions for the Update item operation.
When you are done specifying the details of the operation, choose the + button.
To change the order of actions, choose an action in the list on the left side, and then choose the up or down arrows to move it up or down in the list.
To delete an action, choose the action in the list, and then choose the Delete (trash can) icon.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
-
If you want to save this operation for later use, choose Save operation, then enter a name for your operation and choose Save.
For more information about transactions, see Amazon DynamoDB transactions.