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.

AWS::Route53::RecordSet.TTL should be String not Long

See original GitHub issue

cfn-lint version: (0.29.0)

Description of issue.

One of our pipelines started failing on cfn-lint today, and the error given is: E3012 Property Resources/DbCNAME/Properties/TTL should be of type Long

I see this was due to a change in the new version released yesterday. The change is from this PR: https://github.com/aws-cloudformation/cfn-python-lint/pull/1417

The AWS CloudFormation docs show this value should be a string: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html

We’re just ignoring this rule for now but I think it needs to be looked at again.

Here is the excerpt from the template:

"DbCNAME": {
      "Type": "AWS::Route53::RecordSet",
      "Properties": {
        "HostedZoneId": {
          "Fn::ImportValue": {
            "Fn::Sub": "${AWS::Region}-hosted-zone-id"
          }
        },
        "Name": {
          "Fn::Join": [
            ".",
            [
              "db",
              "inspections",
              {
                "Fn::ImportValue": {
                  "Fn::Sub": "${AWS::Region}-hosted-zone-name"
                }
              }
            ]
          ]
        },
        "Type": "CNAME",
        "TTL": "300",
        "ResourceRecords": [
          {
            "Fn::GetAtt": [
              "DbCluster",
              "Endpoint.Address"
            ]
          }
        ]
      }
    },

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
farskicommented, Aug 13, 2021

So the main question is: are we trying to lint against the spec (as per typical static code analysis) or per intent, i.e. the letter or the spirit?

The description of this project says it lints against the spec, so I think it would be strange to do anything else.

3reactions
kddejongcommented, Mar 17, 2020

Looking into this one. https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html#API_ChangeResourceRecordSets_RequestParameters has TTL as Long. Talking with a few people at AWS about how to handle this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::Route53::RecordSet.TTL should be String not Long ...
It allows us to test that TTL is long so we can provide quicker feedback but would allow the value type to be...
Read more >
AWS::Route53::RecordSet - AWS CloudFormation
Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight ....
Read more >
Resolve the "CharacterStringTooLong (Value is too ... - AWS
1. Open the resource record that you received from your third-party provider. 2. To adhere to the 255 character maximum for a single...
Read more >
AWS::Route53::RecordSetGroup - AWS CloudFormation
A TXT record that contains an SPF string, which is used to identify the sender of email messages. SPF records are no longer...
Read more >
change-resource-record-sets - AWS Documentation
Amazon Route 53 will delete the resource record set automatically. ... However, we no longer recommend that you create resource record sets ...
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