aws / aws/aws-sam-cli

AWS SAM with !ImportValue and !Ref cannot use together

Open
#5,884 1 comment 0 reactions 0 assignees View on GitHub
area/intrinsics
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

I have a Lambda function to deploy using AWS SAM. In some way, I cannot build stack if I set up layers using `!ImportValue` and `!Ref` together. If I comment one of them, it builds without errors.

```
Parameters:
LoggingLayerARN:
Type: AWS::SSM::Parameter::Value
Default: /some/parameter

TestLambda:
Type: AWS::Serverless::Function
Properties:
Layers:
- !ImportValue AnotherStackLayer
- !Ref SSMParameterLayerARN
```

The error I've got:

`Layer References need to be of type 'AWS::Serverless::LayerVersion' or 'AWS::Lambda::LayerVersion'`

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.