Created
December 29, 2019 22:30
-
-
Save djg07/e8a6f52efb2f82edd587fb10aef269e4 to your computer and use it in GitHub Desktop.
This file contains 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
import json | |
import boto3 | |
client = boto3.client('lambda') | |
def lambda_handler(event, context): | |
inputForInvoker = {'CustomerId': '123', 'Amount': 50 } | |
response = client.invoke( | |
FunctionName='YOUR LAMBDA ARN', | |
InvocationType='RequestResponse', # Event | |
Payload=json.dumps(inputForInvoker) | |
) | |
responseJson = json.load(response['Payload']) | |
print('\n') | |
print(responseJson) | |
print('\n') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment