【以下的问题经过翻译处理】 尝试在Step Function中执行DynamoDB扫描和过滤,但过滤不匹配任何项。
我的任务是;
"Scan (2)": {
"Type": "Task",
"Parameters": {
"TableName": "Users",
"FilterExpression": "#Scope = :Global",
"ExpressionAttributeValues": {
":Global": {
"S": "Global"
}
},
"ExpressionAttributeNames": {
"#Scope": {
"S": "Scope"
}
}
},
"Resource": "arn:aws:states:::aws-sdk:dynamodb:scan",
"Next": "Pass"
},
该任务成功运行并产生以下输出;
{
"Count": 0,
"Items": [],
"ScannedCount": 4
}
而这个任务,运行一个扫描(不带过滤)相同的表;
{
"Type": "Task",
"Parameters": {
"TableName": "Users"
},
"Resource": "arn:aws:states:::aws-sdk:dynamodb:scan",,
"Next": "Scan (2)"
}
会产生这个输出;
{
"Count": 4,
"Items": [
{
"Scope": {
"S": "Global"
},
"ServiceName": {
"S": "Driver"
},
"lastVisitDateTime": {
"N": "1680022000"
}
},
{
"Scope": {
"S": "us-east-1"
},
"ServiceName": {
"S": "Driver"
},
"lastVisitDateTime": {
"N": "1680022106"
}
},
{
"Scope": {
"S": "Global"
},
"ServiceName": {
"S": "Rider"
},
"lastVisitDateTime": {
"N": "1680022106"
}
},
{
"Scope": {
"S": "Global"
},
"ServiceName": {
"S": "Driver"
},
"lastVisitDateTime": {
"N": "1680022200"
}
}
],
"ScannedCount": 4
}