We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v1.3.0
Ubuntu
The full error is: E1040 {'Fn::GetAtt': ['SelectAMI', 'AMI']} that does not match 'AWS::EC2::Image.Id'
E1040 {'Fn::GetAtt': ['SelectAMI', 'AMI']} that does not match 'AWS::EC2::Image.Id'
LaunchTemplate: Type: 'AWS::EC2::LaunchTemplate' Properties: LaunchTemplateName: !Sub '${ShortName}-Template' LaunchTemplateData: ImageId: !GetAtt 'SelectAMI.AMI' : SelectAMI: Type: 'Custom::SelectAMI' Properties: ServiceToken: !GetAtt 'SelectAMICustomLambda.Arn' :
The custom lambda use some more information to select right image to the LaunchTemplate and then return it as:
import cfnresponse : def lambda_handler(event, context): : # ami is a string response_data = {"AMI": ami} cfnresponse.send(event, context, cfnresponse.SUCCESS, response_data)
Expected is that the type check do accept string too as it say in the documentation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html
--- AWSTemplateFormatVersion: 2010-09-09 Description: 'Bug E1040 and E3014' Parameters: BuildId: Type: 'AWS::SSM::Parameter::Value<String>' ShortName: Type: 'String' Resources: LaunchTemplate: Type: 'AWS::EC2::LaunchTemplate' Properties: LaunchTemplateName: !Sub '${ShortName}-Template' # E3014 - bug in cfn-lint 1.3.0 ? LaunchTemplateData: # E1040 - bug in cfn-lint 1.3.0 ? ImageId: !GetAtt 'SelectAMI.AMI' SelectAMI: Type: 'Custom::SelectAMI' Properties: # expected: E1010 - due to missing lambda function in this test ServiceToken: !GetAtt 'SelectAMICustomLambda.Arn' RandomNumber: !Ref 'BuildId'
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
CloudFormation Lint Version
v1.3.0
What operating system are you using?
Ubuntu
Describe the bug
The full error is:
E1040 {'Fn::GetAtt': ['SelectAMI', 'AMI']} that does not match 'AWS::EC2::Image.Id'
The custom lambda use some more information to select right image to the LaunchTemplate and then return it as:
Expected behavior
Expected is that the type check do accept string too as it say in the documentation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html
Reproduction template
The text was updated successfully, but these errors were encountered: