Skip to content

Commit beb717f

Browse files
authored
fix lambda inventory as Environment breaks crawler (#165)
1 parent e882b7f commit beb717f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

data-collection/deploy/module-inventory.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,8 @@ Resources:
11141114
obj[f"tag_{tag['Key']}"] = tag["Value"]
11151115
obj['collection_date'] = collection_date
11161116
obj['region'] = region
1117+
if 'Environment' in obj and name == 'lambda':
1118+
obj['Environment'] = to_json(obj['Environment']) # this property breaks crawler as it has a different key structure
11171119
file_.write(to_json(obj) + "\n")
11181120
logger.info(f"Collected {counter} total {name} instances")
11191121
upload_to_s3(name, account_id, payer_id)

0 commit comments

Comments
 (0)