Created
April 29, 2020 18:02
-
-
Save thanakijwanavit/94c2de8c011527c06d263cc17a0197b8 to your computer and use it in GitHub Desktop.
invoke lambda function
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 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