You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,8 @@ Specify your state machine definition using Amazon States Language in a `definit
83
83
84
84
Alternatively, you can also provide the raw ARN, or SQS queue URL, or DynamoDB table name as a string. If you need to construct the ARN by hand, then we recommend to use the [serverless-pseudo-parameters](https://www.npmjs.com/package/serverless-pseudo-parameters) plugin together to make your life easier.
85
85
86
+
In addition, if you want to reference a DynamoDB table managed by an external CloudFormation Stack, as long as that table name is exported as an output from that stack, it can be referenced by importing it using `Fn::ImportValue`. See the `ddbtablestepfunc` Step Function definition below for an example.
87
+
86
88
```yml
87
89
functions:
88
90
hello:
@@ -138,6 +140,27 @@ stepFunctions:
138
140
Resource:
139
141
Fn::GetAtt: [hello, Arn]
140
142
End: true
143
+
ddbtablestepfunc:
144
+
definition:
145
+
Comment: Demonstrates how to reference a DynamoDB Table Name exported from an external CloudFormation Stack
146
+
StartAt: ImportDDBTableName
147
+
States:
148
+
ImportDDBTableName:
149
+
Type: Task
150
+
Resource: "arn:aws:states:::dynamodb:updateItem"
151
+
Parameters:
152
+
TableName:
153
+
Fn::ImportValue: MyExternalStack:ToDoTable:Name # imports a table name from an external stack
0 commit comments