From b2bd0e15fc16e08ca8891d79e50758eb19c84400 Mon Sep 17 00:00:00 2001 From: gruebel Date: Fri, 11 Oct 2019 11:40:57 +0200 Subject: [PATCH] Add possibility to customize function name --- aws/logs_monitoring/log-sam-template.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aws/logs_monitoring/log-sam-template.yaml b/aws/logs_monitoring/log-sam-template.yaml index 820b825ed..126a1f9ee 100644 --- a/aws/logs_monitoring/log-sam-template.yaml +++ b/aws/logs_monitoring/log-sam-template.yaml @@ -1,10 +1,18 @@ AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Pushes logs and metrics from AWS to Datadog. +Parameters: + FunctionName: + Default: '' + Description: 'Define custom function name, if needed' + Type: 'String' +Conditions: + CustomFunctionName: !Not [!Equals [!Ref 'FunctionName', '']] Resources: loglambdaddfunction: Type: 'AWS::Serverless::Function' Properties: + FunctionName: !If ['CustomFunctionName', !Ref 'FunctionName', !Ref 'AWS::NoValue'] Description: Pushes logs and metrics from AWS to Datadog. Handler: lambda_function.lambda_handler MemorySize: 1024