From 4d2d9699e0c2981573b10751390447af2d097fbb Mon Sep 17 00:00:00 2001 From: Rafael Ferreira Date: Sat, 30 Nov 2019 15:20:57 -0500 Subject: [PATCH] Improving names (#45) --- lib/ag-handler.js | 1 - lib/s3-handler.js | 1 - template.yml | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/ag-handler.js b/lib/ag-handler.js index 4e9bec4..e32b71a 100644 --- a/lib/ag-handler.js +++ b/lib/ag-handler.js @@ -11,7 +11,6 @@ const pkg = require('../package.json'); */ exports.handler = async (event, context, callback) => { console.log(`handling callback event using ${pkg.name}/v${pkg.version}`); - console.log(`environment:${JSON.stringify(process.env)}`); try { assert.ok(event.body !== undefined, "event had no body"); diff --git a/lib/s3-handler.js b/lib/s3-handler.js index 739db0a..a7f3235 100644 --- a/lib/s3-handler.js +++ b/lib/s3-handler.js @@ -17,7 +17,6 @@ exports.handler = async (event, context, callback) => { try { console.log(`handling s3 event using ${pkg.name}/v${pkg.version}`); - console.log(`environment:${JSON.stringify(process.env)}`); // pre-flight checks: assert.ok(CONFIG.CALLBACK_URL !== null, "api callback url cannot be null"); diff --git a/template.yml b/template.yml index 51f7a45..f2b9520 100644 --- a/template.yml +++ b/template.yml @@ -12,10 +12,6 @@ Parameters: scaniiApiSecret: Description: Your scanii.com API secret Type: String - envSuffix: - Description: The environment name (a suffix really) to be appended to your lambda functions - Type: String - Default: prod actionTagObject: Description: Should custom tags be added to S3 objects after processing? Type: String @@ -37,7 +33,7 @@ Resources: DependsOn: ScaniiCallbackFn Properties: CodeUri: . - FunctionName: !Sub "uvasoftware-scanii-lambda-submit-${envSuffix}" + FunctionName: !Sub "${AWS::StackName}-Submit" Handler: lib/s3-handler.handler Runtime: nodejs12.x MemorySize: 256 @@ -60,7 +56,7 @@ Resources: Type: AWS::Serverless::Function Properties: CodeUri: . - FunctionName: !Sub "uvasoftware-scanii-lambda-callback-${envSuffix}" + FunctionName: !Sub "${AWS::StackName}-Callback" Handler: lib/ag-handler.handler Runtime: nodejs12.x MemorySize: 256