Skip to content

Conditional statments not works in AWS::Serverless::Function Events #1724

@pandithdurai

Description

@pandithdurai

Description:

Conditional statements not works in AWS::Serverless::Function Events

!If [condition, true, false]

  APILambda:
    Type: AWS::Serverless::Function
    DependsOn:
      - IAMLambda
    Properties:
      Events:
        HealthcheckEvent:
          Properties:
            RestApiId:
              Ref: APIGateway

            Path: /healthcheck
            Method: GET
            **Auth:
              ApiKeyRequired: !If [CreateProdResources, true, false]**

Observed result:
Not changing API Key required to true or false in conditional statements
Expected result:
It should change true from false or false from true when use conditional statements but nothing changes and no error message
sam_template.yml.txt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions