Older runtimes often have slower cold start times, which can increase your billable duration. They also come with a bit of higher security risks than the modern ones.
We built the End of Life plugin that syncs data from the endoflife.date service to make it easier to search for cloud assets using deprecated runtimes.
Here’s an example PostgreSQL query of combining data from your AWS and End of Life sync to find out what Lambda functions are close to deprecation:
SELECT
account_id as account,
region,
arn,
runtime,
support_until as "Support Ends",
eol_since as "EOL",
status,
tags
FROM (
SELECT
f.account_id,
f.region,
f.arn,
r.cycle as runtime,
r.support_until,
r.eol_since,
CASE
WHEN r.eol = true OR support_until < now() THEN 'red'
WHEN support_until < now() + INTERVAL '9 months' THEN 'yellow'
ELSE 'green'
END AS status,
f.tags
FROM aws_lambda_functions f
LEFT JOIN endoflife_products r
ON r.product = 'aws-lambda'
AND COALESCE(f.configuration, '{}')::jsonb ->> 'Runtime' = r.cycle
WHERE 1=1 -- placeholder for the WHERE clause that references status
) subquery
WHERE status != 'green'
ORDER BY account_id ASC;