1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
As you can here, the event that your Lambda receives is like this:
{
"eventID": "c9fbe7d0261a5163fcb6940593e41797",
"eventName": "INSERT",
"eventVersion": "1.1",
"eventSource": "aws:dynamodb",
"awsRegion": "us-east-2",
"dynamodb": {
"ApproximateCreationDateTime": 1664559083.0,
"Keys": {
"SK": { "S": "PRODUCT#CHOCOLATE#DARK#1000" },
"PK": { "S": "COMPANY#1000" }
},
"NewImage": {
"quantity": { "N": "50" },
"company_id": { "S": "1000" },
"fabric": { "S": "Florida Chocolates" },
"price": { "N": "15" },
"stores": { "N": "5" },
"product_id": { "S": "1000" },
"SK": { "S": "PRODUCT#CHOCOLATE#DARK#1000" },
"PK": { "S": "COMPANY#1000" },
"state": { "S": "FL" },
"type": { "S": "" }
},
"SequenceNumber": "700000000000888747038",
"SizeBytes": 174,
"StreamViewType": "NEW_AND_OLD_IMAGES"
},
"eventSourceARN": "arn:aws:dynamodb:us-east-2:111122223333:table/chocolate-table-StreamsSampleDDBTable-LUOI6UXQY7J1/stream/2022-09-30T17:05:53.209"
}
As you only want inserts, your filter pattern should look like this:
{ "eventName": ["INSERT"]}
In your case you specified event_name
.
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 6 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
Thank you, I tried that earlier, but didn't work and changed it to event_name. BUT it is working now. Does it take some time to reflect the filter pattern?
Also, I am making a second filter for valid in NewImage. Here is what I've tried; { "dynamodb": { "NewImage": { "valid": { "BOOL": [false] }}}} I've replaced BOOL with B, BOOLEAN, Bool, but none work so far.
Based off of the scalarAttributeType enum, I'm guessing the correct choice is B, but not sure why it doesn't work.
Ok, it's flowing through now, I just needed a bit more patience. 5-10min for others who might find it useful.