Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Failure to validate templates that use the AWS::URLSuffix psedo parameter #173

Closed
nskoufis opened this issue Jun 18, 2018 · 2 comments · Fixed by #174
Closed

Failure to validate templates that use the AWS::URLSuffix psedo parameter #173

nskoufis opened this issue Jun 18, 2018 · 2 comments · Fixed by #174
Labels
Milestone

Comments

@nskoufis
Copy link
Contributor

When validating templates that include the AWS::URLSuffix pseudo parameter, the value is not recognised and an error is thrown.

Steps to reproduce:

  1. Execute cfn-lint validate sample.json, where sample.json contains the following:
{
    "Resources": {
        "TestLambdaPermissionEventsRuleSchedule1": {
            "Type": "AWS::Lambda::Permission",
            "Properties": {
                "FunctionName": "test",
                "Action": "lambda:InvokeFunction",
                "Principal": {
                    "Fn::Join": [
                        "",
                        [
                            "events.",
                            {
                                "Ref": "AWS::URLSuffix"
                            }
                        ]
                    ]
                },
                "SourceArn": "arn:aws:lambda:us-east-1:123456789012:function:Test"
            }
        }
    }
}

Expected outcome: no validation errors
Actual outcome:

0 infos
0 warn
1 crit
Resource: Resources > TestLambdaPermissionEventsRuleSchedule1 > Properties > Principal
Message: Referenced value AWS::URLSuffix does not exist
Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html

Template invalid!

I'm working on a PR for this. It's a simple fix, I just need some tests

@martysweet
Copy link
Owner

This should be fixed in v.1.7.3 which is now on npm.

@martysweet
Copy link
Owner

Thanks for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants