Created
September 14, 2019 01:47
-
-
Save djg07/bfcdde4ce564e089448dadb40c606683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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