Skip to content

Instantly share code, notes, and snippets.

@thanakijwanavit
Created July 22, 2021 12:39
Show Gist options
  • Save thanakijwanavit/06358c97bb9fe5ffc1228f461dc548f4 to your computer and use it in GitHub Desktop.
Save thanakijwanavit/06358c97bb9fe5ffc1228f461dc548f4 to your computer and use it in GitHub Desktop.
sign using aws boto token
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