s3touch icon indicating copy to clipboard operation
s3touch copied to clipboard

Error: Cannot read property 'Topic' of undefined

Open jfrac opened this issue 8 years ago • 3 comments

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.

jfrac avatar Mar 24 '17 09:03 jfrac

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.

colonelpopcorn avatar Jan 24 '19 20:01 colonelpopcorn

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.

Same - trying to trigger a Lambda event from file activity

RichardCullen avatar Mar 15 '19 02:03 RichardCullen

@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.

colonelpopcorn avatar Mar 15 '19 02:03 colonelpopcorn