Skip to content

Instantly share code, notes, and snippets.

@djg07
Created December 29, 2019 22:30
Show Gist options
  • Save djg07/e8a6f52efb2f82edd587fb10aef269e4 to your computer and use it in GitHub Desktop.
Save djg07/e8a6f52efb2f82edd587fb10aef269e4 to your computer and use it in GitHub Desktop.
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