Skip to content

RequestMappingTemplateS3Location does not work with Fn::If #1138

Open
@fcobia

Description

@fcobia

I have a template for an AppSync Pipeline Function that references a different template depending on a condition. While SAM normally translates the location to the proper s3 location, it does not work if I have an Fn::If.

I would have expected that SAM would translate both locations specified in the Fn::If.

Example:

  EnvironmentPipelineFunc:
    Type: "AWS::AppSync::FunctionConfiguration"
    Condition: IsProd
    Properties:
      Name: "Environment"
      RequestMappingTemplateS3Location: !If [IsProd, "prodRequest.vm", "testRequest.vm"]
      ResponseMappingTemplateS3Location: !If [IsProd, "prodResponse.vm", "testResponse.vm"]
      DataSourceName: !GetAtt "VTLDataSource.Name"
      FunctionVersion: "2018-05-29"
      ApiId: !GetAtt "API.ApiId"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions