Skip to content

Instantly share code, notes, and snippets.

@chloegrace94
Created October 2, 2018 15:27
Show Gist options
  • Save chloegrace94/79879baeba7c71fbfffe5f2cf5f546d4 to your computer and use it in GitHub Desktop.
Save chloegrace94/79879baeba7c71fbfffe5f2cf5f546d4 to your computer and use it in GitHub Desktop.
Invoke a Lambda function using boto3
import boto3
client = boto3.client('lambda')
# Invoke Lambda using invocation type: 'Event'
response = client.invoke(
FunctionName='final_response_lambda',
InvocationType='Event',
LogType='None',
Payload= json.dumps(body),
)
logger.info("Lambda invoke: " + str(response))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment