@tables-streams
Define Lambda functions for streaming changes from DynamoDB tables. Respond to insert
, update
, and destroy
events with a handler function.
Recommended Resources
Syntax
- Name
- Lowercase alphanumeric string
- Must match a
@tables
name
Table streams can use more verbose configuration to allow for custom source paths and names in your project. This is beneficial when creating more than one stream function for a single table. Optionally provide a name
and/or src
for each table stream.
name
- a string as defined in@tables
src
- path to the function source
Example
This app.arc
file defines a table with a corresponding stream handler:
arc
@app
testapp
@tables
people
pplID *String
@tables-streams
people
# verbose custom source:
a-named-table-stream
table people
src custom/source
json
{
"app": "testapp",
"tables": [
{
"people": {
"pplID": "*String"
}
}
],
"tables-streams": [
"people",
{
"a-named-table-stream": {
"name": "people",
"src": "custom/source"
}
}
]
}
yaml
---
app: testapp
tables:
- people:
pplID: "*String"
tables-streams:
- people
# verbose custom source:
- "a-named-table-stream":
name: "people"
src: "custom/source"
⚠️ Unfortunately, “dynalite” (used under the hood in Architect Sandbox) doesn’t support streams, so emulation isn’t yet supported for local development.