MCPcopy Create free account
hub / github.com/dwyl/aws-lambda-test-utils / createDynamoDBRecord

Function createDynamoDBRecord

mockEvent.js:25–52  ·  view source on GitHub ↗
(type, options)

Source from the content-addressed store, hash-verified

23}
24
25function createDynamoDBRecord(type, options) {
26 return {
27 "eventID": "1",
28 "eventVersion": "1.0",
29 "dynamodb": {
30 "Keys": {
31 "Id": {
32 "N": "101"
33 }
34 },
35 "NewImage": {
36 "Message": {
37 "S": "New item!"
38 },
39 "Id": {
40 "N": "101"
41 }
42 },
43 "StreamViewType": "NEW_AND_OLD_IMAGES",
44 "SequenceNumber": "111",
45 "SizeBytes": 26
46 },
47 "awsRegion": options.awsRegion,
48 "eventName": type,
49 "eventSourceARN": options.eventSourceARN,
50 "eventSource": "aws:dynamodb"
51 }
52}
53
54function setDefaults(options, type) {
55 var defaultOptions = {

Callers 1

createDynamoDBEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected