Skip to content

Instantly share code, notes, and snippets.

@sloev
Created March 23, 2017 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sloev/9ffec50e45c15f4ee388e6b35c61a740 to your computer and use it in GitHub Desktop.
Save sloev/9ffec50e45c15f4ee388e6b35c61a740 to your computer and use it in GitHub Desktop.
gevent with botocore example (python 2.7)
from gevent import monkey, joinall, spawn
monkey.patch_all()
import botocore.session
def invoke_lambda():
session = botocore.session.get_session()
client = session.create_client('lambda')
return client.invoke(
FunctionName='test',
InvocationType="RequestResponse"
)
results = joinall([
gevent.spawn(invoke_lambda),
gevent.spawn(invoke_lambda)
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment