Skip to content

Commit bb76b88

Browse files
committed
fixup! Implement Lambda function versions (#5927)
1 parent 72477c6 commit bb76b88

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

scripts/sell_unused_slots.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ def _lambda_invocation_counts(self) -> dict[Lambda, int]:
9595
'Namespace': 'AWS/Lambda',
9696
'MetricName': 'Invocations',
9797
'Dimensions': [{
98+
# The 'FunctionName' dimension returns
99+
# aggregate metrics for all versions and
100+
# aliases of the function.
98101
'Name': 'FunctionName',
99102
'Value': lambda_.name
100103
}]

src/azul/lambdas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def _lambda(self):
106106
return aws.lambda_
107107

108108
def list_lambdas(self) -> list[Lambda]:
109+
# Note that this method returns the unpublished "$LATEST" version of
110+
# each function.
109111
return [
110112
Lambda.from_response(function)
111113
for response in self._lambda.get_paginator('list_functions').paginate()

0 commit comments

Comments
 (0)