MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / lambda_handler

Function lambda_handler

examples/aws_lambda/lambda_handler.py:70–98  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

68# Lambda handler
69# ------------------------------------------------------
70def lambda_handler(event, context):
71 # Initialize Keeper Commander params
72 params = get_params()
73
74 # Keeper login and sync
75 api.login(params)
76 api.sync_down(params)
77 # Enterprise sync (for enterprise commands)
78 api.query_enterprise(params)
79
80 run_keeper_cli(
81 params,
82 'device-approve -a'
83 )
84
85 run_keeper_cli(
86 params,
87 'action-report --target locked --apply-action delete --dry-run'
88 )
89
90 return get_keeper_report(
91 params,
92 {
93 'report_type':'raw',
94 'format':'json',
95 'limit':100,
96 'event_type':['login']
97 }
98 )

Callers

nothing calls this directly

Calls 6

run_keeper_cliFunction · 0.85
get_keeper_reportFunction · 0.85
get_paramsFunction · 0.70
loginMethod · 0.45
sync_downMethod · 0.45
query_enterpriseMethod · 0.45

Tested by

no test coverage detected