Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Created April 29, 2020 18:02
Show Gist options
  • Save thanakijwanavit/94c2de8c011527c06d263cc17a0197b8 to your computer and use it in GitHub Desktop.
Save thanakijwanavit/94c2de8c011527c06d263cc17a0197b8 to your computer and use it in GitHub Desktop.
invoke lambda function
import boto3
lambda_ = boto3.client('lambda',
aws_access_key_id = MY_ACCESS_KEY_ID,
aws_secret_access_key = MY_SECRET_ACCESS_KEY,
region_name = 'us-east-1' )
response = lambda_.invoke(
FunctionName='arn:aws:lambda:us-east-1:xxxxxx',
InvocationType='RequestResponse',
LogType='Tail',
Payload= json.dumps({'test': 'testPayload'})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment