MCPcopy Create free account
hub / github.com/aws-samples/personalization-apis / lambda_handler

Function lambda_handler

src/edge_update_function/main.py:86–97  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

84 update_function(event)
85
86def lambda_handler(event, context):
87 logger.info(os.environ)
88 logger.info(json.dumps(event, indent = 2, default = str))
89
90 # If the event has a RequestType, we're being called by CFN as custom resource
91 if event.get('RequestType'):
92 logger.info('Function called from CloudFormation as custom resource')
93 helper(event, context)
94 else:
95 logger.info('Function called outside of CloudFormation')
96 # Call function directly (i.e. testing in Lambda console or called directly)
97 update_function(event)

Callers

nothing calls this directly

Calls 1

update_functionFunction · 0.70

Tested by

no test coverage detected