AWS1 input → 2 outputs
DynamoDB Scan
Reads every item in a DynamoDB table with optional attribute filtering. Appropriate for admin maintenance — finding expired tokens, inactive sessions, or orphaned records. Always prefer DynamoDB Query when you know the partition key.
Inputs
Outputs
Output 1 — Success Output 2 — ErrorHow to Use
- Select an AWS config node and enter the Table Name.
- Add a Filter Expression via the Visual Builder to narrow results — without a filter the entire table is returned.
- Set a Limit to cap the number of items per page, or enable Auto-paginate to collect all pages in one message.
- Wire Output 1 to process the items array.
Scan vs Query
Filter Builder
Add filter rows for any attribute. Each row compiles automatically to a DynamoDB FilterExpression. Filters run after DynamoDB reads the items — you are still charged for reading the full table. Toggle to Advanced for raw expression input with ExpressionAttributeNames and Values.
Examples
Healthcare Admin — Find all expired OAuth tokens:
┌──────────┐ ┌──────────────────┐ ┌──────────────────┐ │ Inject │──▶│ DynamoDB Scan │──▶│ Trigger Re-Auth │ │ (cron) │ │ expiresAt < now │ │ for each item │ └──────────┘ └──────────────────┘ └──────────────────┘
// Visual filter row: attribute=expiresAt, operator=<, value=1714000000
// Or runtime override:
msg.payload = {
filterExpression: 'attribute_exists(#token) AND #exp < :now',
expressionAttributeNames: { '#token': 'accessToken', '#exp': 'expiresAt' },
expressionAttributeValues: { ':now': Math.floor(Date.now() / 1000) },
projectionExpression: 'id, sk, expiresAt'
};
// Output 1:
msg.payload = {
items: [
{ id: 'cerner-clinic-B', sk: 'oauth_token', expiresAt: 1710000000 }
],
count: 1, scannedCount: 47
};
Best Practices
- Always add a filter — without one the entire table is returned to the flow engine.
- Set a Limit and loop through pages rather than using Auto-paginate on large tables.
- Use Projection (Advanced mode) to return only the fields you need — reduces payload size and network transfer.
- If you frequently scan for the same attribute, consider adding a Global Secondary Index so you can use Query instead.