1. inukai-norio
Changes in body
Source | HTML | Preview
@@ -66,24 +66,16 @@
return sqsUriNormal;
}
return sqsUriFast;
};
-let retmsg = (msg) => {
- console.log(msg);
- return msg;
-};
-
exports.handler = async (event, context) => {
let bucket = event.Records[0].s3.bucket.name;
let key = decodeURIComponent(event.Records[0].s3.object.key);
-
try {
- let sqsName = getPutSqs(parseYaml(await getYaml(bucket, key)));
- let ret = await enqueueSQS(sqsName, key);
- return retmsg(ret);
- } catch (err) {
- throw new Error(retmsg(err));
- }
-
+ let sqsName = getPutSqs(parseYaml(await getYaml(bucket, key)));
+ let ret = await enqueueSQS(sqsName, key);
+ console.log(msg);
+ return msg;
+
};
```