Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message for "AWS::Serverless::Application" resource with "Fn::FindInMap" #1606

Closed
ylynn opened this issue Jun 1, 2020 · 3 comments
Closed
Labels
area/intrinsics Ref, If, Sub, GetAtt, ... type/bug

Comments

@ylynn
Copy link
Contributor

ylynn commented Jun 1, 2020

Description:

Error message for "AWS::Serverless::Application" resource with "Fn::FindInMap" is "TypeError: unhashable type: 'list'", which is not helpful.

Steps to reproduce the issue:
Parts of the template

Parameters:
  SemVer:
    Type: String
    Default: 1.0.0

Mappings:
  MyMap:
    appId:
      appIdValue: arn:aws:serverlessrepo:us-east-1:1234xxx:applications/anotherApp
    version:
      versionValue:
      - Ref: Semver

Resources:
  myApp:
    Type: AWS::Serverless::Application
    Properties:
      Location:
        ApplicationId:
          Fn::FindInMap:
          - MyMap
          - appId
          - appIdValue
        SemanticVersion:
          Fn::FindInMap:
          - MyMap
          - version
          - versionValue

Observed result:
TypeError: unhashable type: 'list'

Expected result:

@mateuszowolf
Copy link

I think it might be this part

version:
    versionValue
    - Ref: Semver

which should look like this:

version:
    versionValue: !Ref Semver

@sriram-mv sriram-mv added stage/bug-repro The issue/bug needs to be reproduced type/bug labels Feb 22, 2021
@hoffa hoffa removed the stage/bug-repro The issue/bug needs to be reproduced label May 25, 2021
@jfuss jfuss added the area/intrinsics Ref, If, Sub, GetAtt, ... label Mar 29, 2022
@hoffa
Copy link
Contributor

hoffa commented Oct 17, 2022

You might be able to get this to work by adding AWS::LanguageExtensions to Transform as such:

Transform:
  - AWS::LanguageExtensions
  - AWS::Serverless-2016-10-31

AWS::LanguageExtensions resolves intrinsic functions if the value is known when Transforms are run.

See #2533 for more information.

@hoffa
Copy link
Contributor

hoffa commented Nov 3, 2022

Closing in favor of #2533.

@hoffa hoffa closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/intrinsics Ref, If, Sub, GetAtt, ... type/bug
Projects
None yet
Development

No branches or pull requests

6 participants