aws / aws/aws-sam-cli

RequestMappingTemplateS3Location does not work with Fn::If

Open
#1,138 3 comments 0 reactions 0 assignees View on GitHub
area/package maintainer/need-response type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

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:

```yaml
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"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.