From 07b65f1205ac63fc7cc123ade670998c3f76a17c Mon Sep 17 00:00:00 2001 From: Gaurav Gogia <16029099+gaurav-gogia@users.noreply.github.com> Date: Wed, 30 Mar 2022 15:18:53 +0530 Subject: [PATCH] minor fix --- pkg/mapper/iac-providers/cft/config/lambda-function.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/mapper/iac-providers/cft/config/lambda-function.go b/pkg/mapper/iac-providers/cft/config/lambda-function.go index 92fe09626..6f9c9ccee 100644 --- a/pkg/mapper/iac-providers/cft/config/lambda-function.go +++ b/pkg/mapper/iac-providers/cft/config/lambda-function.go @@ -67,8 +67,11 @@ func GetLambdaFunctionConfig(sf interface{}) []AWSResourceConfig { return getLambdaConfig(l) } - s := sf.(*serverless.Function) - return getServerlessConfig(s) + if s, ok := sf.(*serverless.Function); ok { + return getServerlessConfig(s) + } + + return nil } func getServerlessConfig(sf *serverless.Function) []AWSResourceConfig {