Last active
May 23, 2019 04:33
-
-
Save wataruoguchi/dea7dc4cbc3cff73c61cfd4831ee2171 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handler.js | |
'use strict'; | |
export handler = function(event, context, callback) { | |
const key = event.Records[0].s3.object.key; | |
const sourceKey = decodeURIComponent(key.replace(/\+/g, ' ')); | |
const outputKey = sourceKey.split('.')[0]; | |
const success = { key, sourceKey, outputKey }; | |
const error = null; | |
callback(error, success); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment