Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'substring' of undefined #12

Open
aritudo1 opened this issue Jan 9, 2020 · 0 comments
Open

Cannot read property 'substring' of undefined #12

aritudo1 opened this issue Jan 9, 2020 · 0 comments

Comments

@aritudo1
Copy link

aritudo1 commented Jan 9, 2020

Keeps saying undefined here event.detail.source.substring. Not sure what needs to be defined. I've tried substituting with different strings and also defining the source. Using this on GovCloud and Cloudwatch rule to collect CloudTrail snapshot events and invoke the Step Function. Any help is appreciated.

var volumeId = event.detail.source.substring(event.detail.source.indexOf('/') + 1);
var snapshotId = event.detail.snapshot_id.substring(event.detail.snapshot_id.indexOf('/') + 1);

{
"errorType": "TypeError",
"errorMessage": "Cannot read property 'substring' of undefined",
"trace": [
"TypeError: Cannot read property 'substring' of undefined",
" at Runtime.exports.handler (/var/task/TagSnapshots.js: 12:40)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant