Created
July 22, 2021 12:39
-
-
Save thanakijwanavit/06358c97bb9fe5ffc1228f461dc548f4 to your computer and use it in GitHub Desktop.
sign using aws boto token
This file contains hidden or 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
from aws_requests_auth.boto_utils import BotoAWSRequestsAuth | |
auth = BotoAWSRequestsAuth(aws_host='api.example.com', | |
aws_region='us-east-1', | |
aws_service='execute-api') | |
import requests | |
response = requests.post('https://api.example.com/test', json={"foo": "bar"}, auth=auth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment