question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid FindInMap does not get picked up

See original GitHub issue

Got the following mapping:

Mappings:
  CertificateMap:
    us-east-1:
      Arn: arn:aws:acm:us-east-1:<account>:certificate/<id>

Resources
  AppAlbListener:
    Type: AWS::ElasticLoadBalancingV2::Listener
    Properties:
      # ...
      Certificates:
        - CertificateArn:
            Fn::FindInMap: [CertificateMap, !Ref 'AWS::Region', id]

As you can see, Fn::FindInMap is referencing the id key instead of Arn. We should add a rule to fail in such a scenario.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kddejongcommented, Nov 8, 2018

I had ideas to create this rule a few times but I always paused when you realized you can use Ref for the MapName. But what we should have done is just punt in that scenario. Have some check for common scenarios of the map being a string is better than nothing.

1reaction
hoshsadiqcommented, Oct 31, 2018

Yes please, would be good. I do have a few questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid FindInMap does not get picked up · Issue #425 - GitHub
As you can see, Fn::FindInMap is referencing the id key instead of Arn . We should add a rule to fail in such...
Read more >
Fn::FindInMap - AWS CloudFormation
The intrinsic function Fn::FindInMap returns the value corresponding to keys in a two-level ... You can't nest two instances of two functions in...
Read more >
amazon web services - Cloudformation IF issue - Stack Overflow
In my CloudFormation I wanted to use qa mappings for other environment qa-1 . Came up with following attempt, but CF was still...
Read more >
Learn template basics - Amazon CloudFormation - 亚马逊云科技
A template is a declaration of the Amazon resources that make up a stack. ... requiring the user to input a value does...
Read more >
AWS Website Hosting With CloudFormation | by Alain Seng
CloudFront cache invalidation. Whenever a new version of a website is uploaded to the S3 bucket, it might be not immediately available to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found