Created
June 15, 2021 21:54
-
-
Save gbvanrenswoude/9f50fc5a1a17876bbe0d857fec1a4bd3 to your computer and use it in GitHub Desktop.
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
from requests_aws4auth import AWS4Auth | |
import boto3 | |
import requests | |
credentials = boto3.Session().get_credentials() | |
awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, 'eu-central-1', 'es', session_token=credentials.token) | |
r = requests.get(url, auth=awsauth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment