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.

Getting error when using !GetAtt for SecurityGroups Property of type AWS::AutoScaling::LaunchConfiguration

See original GitHub issue

cfn-lint version: 0.29.6

Description of issue. We are getting the following error:

cfnlint: E3008 Property “SecurityGroups” has no valid Fn::GetAtt options at Resources/TempLaunchConfig/Properties/SecurityGroups/0/Fn::GetAtt

The correlating piece of the template is:

TestLaunchConfig:
    Type: "AWS::AutoScaling::LaunchConfiguration"
    Properties:
      SecurityGroups:
        - !GetAtt TempSecurityGroup.GroupId

We do realize that we can use !Ref TempSecurityGroup, but because we have this in a lot of templates, we’d rather not change them all and continue using !GetAtt TempSecurityGroup.GroupId as it’s supported by CloudFormation.

Relevant documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-securitygroups

Related Issue: https://github.com/aws-cloudformation/cfn-python-lint/issues/888

Cfn-lint should support passing in a GroupId using !GetAtt for the SecurityGroups Property list. This template is valid and does deploy.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nwesoccercommented, Apr 29, 2020

@PatMyron The type is AWS::EC2::SecurityGroup. It is in the same template yes.

0reactions
nwesoccercommented, Apr 30, 2020

@kbcaleb @PatMyron Thank you both for the speedy communication and fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error when using !GetAtt for SecurityGroups Property ...
We are getting the following error: cfnlint: E3008 Property "SecurityGroups" has no valid ... GetAtt for SecurityGroups Property of type ...
Read more >
AWS::AutoScaling::LaunchConfiguration - AWS CloudFormation
This example shows a launch configuration with a BlockDeviceMappings property that lists two devices: a 30 gigabyte EBS root volume mapped to /dev/sda1...
Read more >
I have a problem in cloud formation. Error when using Fn::Join ...
I found solution. SecurityGroupIds: !Split - "," - !Sub - "${idList},${Lpsecurity}" - idList: !Join [",",!Ref "SecurityGroup"].
Read more >
Learn template basics - Amazon CloudFormation - 亚马逊云科技
Learn the template basics of using resources, parameters, and other components of templates and how they work together.
Read more >
Launch Configuration Referencing Missing Security Groups
Using AWS CLI ... If the command respond with an InvalidGroup.NotFound error message (as shown in the example above), the requested Security Group ......
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