Consider python code (python 3.7)
def status(event, context):
for key, value in event.items():
print(key, value)
print (event)
print (event.statuses)
This produce the output:
statuses ['SUCCESS', 'SUCCESS']
{'statuses': ['SUCCESS', 'SUCCESS']}
[ERROR] AttributeError: 'dict' object has no attribute 'statuses'
Traceback (most recent call last):
File "/path/my_func.py", line 11, in status
print (event.statuses)
It prints key statuses
during iteration but .
operator does not work. Any ideas?