Skip to content

Instantly share code, notes, and snippets.

@djg07
Created September 14, 2019 01:47
Show Gist options
  • Save djg07/bfcdde4ce564e089448dadb40c606683 to your computer and use it in GitHub Desktop.
Save djg07/bfcdde4ce564e089448dadb40c606683 to your computer and use it in GitHub Desktop.
from __future__ import print_function
import json
import urllib
import boto3
import datetime
print('Loading message function...')
def process_refund(message, context):
#1. Log input message
print('Received message from Step Function:')
print(message)
#2. Construct response
response = {}
response['TransactionType'] = message['TransactionType']
response['Timestamp'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
response['Message'] = 'Hello from Refund Processor!'
#3. Return response
print(response)
return (response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment