Skip to content

Instantly share code, notes, and snippets.

@jdaarevalo
Created April 21, 2023 18:52
Show Gist options
  • Save jdaarevalo/4c12356d474565fb01316618de51fb80 to your computer and use it in GitHub Desktop.
Save jdaarevalo/4c12356d474565fb01316618de51fb80 to your computer and use it in GitHub Desktop.
from dynamo_operations import update_item_finished
...
SG_PROCESSES_TABLE_NAME = os.getenv('SG_PROCESSES_TABLE_NAME')
...
@logger.inject_lambda_context
def lambda_handler(event, context):
...
# Update the status item in Dynamo
item_state = json_body.get("item_state")
update_item_finished(SG_PROCESSES_TABLE_NAME, item_state)
logger.info({"action":"update_item", "payload":{"item_state":item_state}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment