Control: Route 53 records should have higher TTL configured
Description
If you configure a higher TTL for your records, the intermediate resolvers cache the records for longer time. As a result, there are fewer queries received by the name servers. This configuration reduces the charges corresponding to the DNS queries answered. A value between an hour (3600s) and a day (86,400s) is a common choice.
Usage
Run the control in your terminal:
powerpipe control run aws_thrifty.control.route53_record_higher_ttl
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_thrifty.control.route53_record_higher_ttl --share
Steampipe Tables
SQL
select 'arn:' || r.partition || ':route53:::hostedzone/' || r.zone_id || '/recordset/' || r.name || '/' || r.type as resource, case when ttl::int < 3600 then 'alarm' else 'ok' end as status, case when ttl::int < 3600 then r.title || ' TTL value is ' || ttl || 's.' else r.title || ' TTL value is ' || ttl || 's.' end as reason , r.region, r.account_idfrom aws_route53_zone as z, aws_route53_record as rwhere r.zone_id = z.id;