Error: Cannot read property 'Topic' of undefined
I touch a single file in S3 bucket
s3touch s3://bucket/folder/file.jpg
and get this error:
/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:30
throw err;
^
TypeError: Cannot read property 'Topic' of undefined
at Response.<anonymous> (/usr/local/lib/node_modules/s3touch/index.js:34:56)
at Request.<anonymous> (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:353:18)
at Request.callListeners (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:595:14)
at Request.transition (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:37:9)
at Request.<anonymous> (/usr/local/lib/node_modules/s3touch/node_modules/aws-sdk/lib/request.js:597:12)
Thanks in advance.
It looks like line 35 in index.js explicitly references a TopicConfiguration key for SNS topic notifications. However, when I tried to touch a file in a bucket that had a lambda function listening to the ObjectCreated event I got the same error as you.
It looks like line 35 in
index.jsexplicitly references aTopicConfigurationkey for SNS topic notifications. However, when I tried to touch a file in a bucket that had a lambda function listening to the ObjectCreated event I got the same error as you.
Same - trying to trigger a Lambda event from file activity
@RichardCullen I "solved" it by changing the Lambda to listen for an SNS topic message instead of a Lambda event. It's a little harder to parse, but it works for my needs.