The plugin will remove the 2 IAM statements if custom.env == 'staging' BUT leaves null in their place: from cloudformation-template-update-stack.json, irrelevant parts omitted:
The CloudFormation template is invalid: [/Resources/DataEnricherIamRoleLambdaExecution/Type/Policies/0/PolicyDocument/Statement/3] 'null' values are not allowed in templates
Given I have a function definition:
and I have an serverlessIfElse recipe:
The plugin will remove the 2 IAM statements if custom.env == 'staging' BUT leaves null in their place: from cloudformation-template-update-stack.json, irrelevant parts omitted:
This breaks deployments with error:
The CloudFormation template is invalid: [/Resources/DataEnricherIamRoleLambdaExecution/Type/Policies/0/PolicyDocument/Statement/3] 'null' values are not allowed in templates