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 GetAtt with LambdaFunctionARN

See original GitHub issue

cfn-lint version: (cfn-lint --version) cfn-lint v0.22.0

Description of issue. Linting seems to not like me using… LambdaFunctionARN: !Ref FunctionLogicalName.Version

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
iDVBcommented, Jul 10, 2019

Sorry! My bad… the resources type is AWS::Serverless::Function and yes its supposed to be !Ref not GetAtt… but it still doesn’t work in the linter… but does work in CFN.

This works with serverless transform. https://github.com/awslabs/serverless-application-model/tree/master/examples/2016-10-31/lambda_edge

UPDATE - Double my bad… I was also missing the following param on the lamnda itself. AutoPublishAlias: live Now that its in there… both the template and the linting work.

Linting help catch a syntax error… who knew!! Thanks btw @kddejong. Sorry for rubberducking in an issue. Maybe this will help someone else that makes the same mistake.

0reactions
iDVBcommented, Jul 10, 2019

Yup, linter is fine with it. Thanks for diving on this so quickly though @kddejong

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid GetAtt with LambdaFunctionARN · Issue #1012
I'm guessing its AWS::Lambda::Version . Which if that is the case should this be a Ref and not a GetAtt? Also, I'm guessing...
Read more >
Fn::GetAtt - AWS CloudFormation
Return the value of an attribute from the resource in the AWS CloudFormation template by using the Fn::GetAtt intrinsic function.
Read more >
Getting Fn::GetAtt error in the AWS SAM template
An AWS::SNS:Topic returns the ARN when you use Ref. Check out the Docs on the return values. Try with
Read more >
A Practical Guide to Surviving AWS SAM Part 1
Introduction to AWS SAM for serverless application deployment using python pycharm comprising test execution and rest API.
Read more >
Migrating from Lambda@Edge to CloudFront Functions
I was always under the impression that the Lambda function was running in the edge cache, hence the name. But I was apparently...
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