Skip to content

Instantly share code, notes, and snippets.

@AllanGH
AllanGH / get_request.py
Last active April 12, 2024 10:16
Make an AWS SIGV4 signed request to AWS
import hmac
import hashlib
from datetime import datetime
import httpx
# Define the AWS request details, url is defined as the API Gateway endpoint where host is the actual host of the API
method = "GET"
url = "<vpce-dns-name>"
host = "<api-id>.execute-api.eu-west-1.amazonaws.com"
path = "/sandbox/test"