martysweet / cfn-lint

A CloudFormation JSON and YAML Validator
MIT License
163 stars 38 forks source link

Issue when using conditionalized intrinsic function #240

Open ARMAAN7139 opened 4 years ago

ARMAAN7139 commented 4 years ago

Resource: LambdaInvokePermission > Properties > FunctionName 2020-04-02T02:30:02.3831599Z Message: Intrinsic function Fn::Sub is not supported here 2020-04-02T02:30:02.3832234Z Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html 2020-04-02T02:30:02.3832858Z 2020-04-02T02:30:02.3833216Z Resource: LambdaInvokePermission > Properties > SourceAccount 2020-04-02T02:30:02.3834094Z Message: Intrinsic function Fn::Sub is not supported here 2020-04-02T02:30:02.3835013Z Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html 2020-04-02T02:30:02.3835423Z 2020-04-02T02:30:02.3835784Z Resource: LambdaInvokePermission > Properties > SourceArn 2020-04-02T02:30:02.3838027Z Message: Intrinsic function Fn::Sub is not supported here 2020-04-02T02:30:02.3840000Z Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html 2020-04-02T02:30:02.3840438Z 2020-04-02T02:30:02.3840850Z Resource: Resources > LambdaInvokePermission > Properties > FunctionName 2020-04-02T02:30:02.3843529Z Message: Expecting a string, got { 2020-04-02T02:30:02.3844084Z 'Fn::Sub': 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${FunctionName}' 2020-04-02T02:30:02.3844461Z } 2020-04-02T02:30:02.3844941Z Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html 2020-04-02T02:30:02.3845338Z 2020-04-02T02:30:02.3845666Z Resource: Resources > LambdaInvokePermission > Properties > SourceAccount 2020-04-02T02:30:02.3846128Z Message: Expecting a string, got { 'Fn::Sub': '${AWS::AccountId}' } 2020-04-02T02:30:02.3847871Z Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html 2020-04-02T02:30:02.3848479Z 2020-04-02T02:30:02.3848805Z Resource: Resources > LambdaInvokePermission > Properties > SourceArn 2020-04-02T02:30:02.3849281Z Message: Expecting an ARN, got { 'Fn::Sub': 'arn:aws:s3:::${BucketName}' } 2020-04-02T02:30:02.3849984Z Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html