Skip to content

Commit

Permalink
Merge pull request #21 from baocin/master
Browse files Browse the repository at this point in the history
Handle when lambda functions have an empty Runtime field in function_data
  • Loading branch information
ranrib authored Aug 10, 2021
2 parents 62964e1 + ce8ed45 commit 283d21d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions list_lambdas.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def create_tables(lambdas_data, args):
str(function_data['MemorySize']),
'%.2f' % (function_data['CodeSize'] / BYTE_TO_MB),
str(function_data['Timeout']),
str(function_data['Runtime']),
str(function_data['Runtime']) if 'Runtime' in function_data else '',
function_data['Description'],
get_days_ago(lambda_data['last-modified']),
last_invocation
Expand Down Expand Up @@ -192,12 +192,13 @@ def print_lambda_list(args):
if args.inactive_days_filter > inactive_days:
continue

# print(function_data)
lambdas_data.append({
'region': region,
'function-data': function_data,
'last-modified': last_modified,
'last-invocation': last_invocation,
'runtime': function_data['Runtime']
'runtime': function_data['Runtime'] if 'Runtime' in function_data else ''
})

# Verify if there is next marker
Expand Down

0 comments on commit 283d21d

Please sign in to comment.