turbot/steampipe-mod-aws-compliance

Control: ACM certificates should not expire within 30 days

Description

Ensure network integrity is protected by ensuring X509 certificates are issued by AWS ACM.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.acm_certificate_expires_30_days

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.acm_certificate_expires_30_days --share

SQL

This control uses a named query:

select
certificate_arn as resource,
case
when renewal_eligibility = 'INELIGIBLE' then 'skip'
when date(not_after) - date(current_date) >= 30 then 'ok'
else 'alarm'
end as status,
case
when renewal_eligibility = 'INELIGIBLE' then title || ' not eligible for renewal.'
else title || ' expires ' || to_char(not_after, 'DD-Mon-YYYY') ||
' (' || extract(day from not_after - current_date) || ' days).'
end as reason
, region, account_id
from
aws_acm_certificate;

Tags