{"id":4449,"library":"awscurl","title":"AWSCurl","description":"AWSCurl is a command-line tool and Python module that provides a curl-like interface for making authenticated requests to AWS APIs. It simplifies interaction with AWS services by automatically handling AWS Signature Version 4 request signing, credential lookup, and header construction. The library supports all AWS services that utilize SigV4, including S3, CloudFront, and Lambda. Currently at version 0.39, it maintains an active release cadence with multiple updates throughout the year to introduce features and address bugs.","status":"active","version":"0.39","language":"en","source_language":"en","source_url":"https://github.com/okigan/awscurl","tags":["aws","cli","http","signing","authentication","api-gateway","s3","ec2"],"install":[{"cmd":"pip install awscurl","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Default dependency for AWS service interaction and credential management.","package":"botocore"},{"reason":"Used for parsing command-line arguments, environment variables, and config files.","package":"configargparse"},{"reason":"An elegant and simple HTTP library for Python, used for making HTTP requests.","package":"requests"},{"reason":"An HTTP library with thread-safe connection pooling, used by 'requests'.","package":"urllib3"}],"imports":[],"quickstart":{"code":"# Set AWS credentials as environment variables (or configure ~/.aws/credentials)\n# export AWS_ACCESS_KEY_ID=\"your_access_key\"\n# export AWS_SECRET_ACCESS_KEY=\"your_secret_key\"\n# export AWS_DEFAULT_REGION=\"us-east-1\"\n\n# Example: List S3 bucket content\nawscurl --service s3 'https://your-bucket-name.s3.amazonaws.com/'","lang":"bash","description":"Make an authenticated GET request to list the contents of an S3 bucket. Ensure your AWS credentials are configured via environment variables, an AWS CLI profile, or provided directly via CLI flags."},"warnings":[{"fix":"Always explicitly define credentials using the method with the highest precedence you intend to use. For debugging, use `--verbose` to see which credentials are being loaded.","message":"Credential precedence can be confusing: Command-line arguments override environment variables, which in turn override values from `~/.aws/credentials` or `~/.aws/config` profiles.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Manually URL-encode problematic parts of your query string, or the entire query string, before passing it via the `-d` flag or in the URI.","message":"Complex query strings, particularly for Prometheus APIs with PromQL filters (e.g., `query={key=\"value\"}`), may require manual URL encoding of the query string before passing it to `awscurl` to avoid `InvalidQueryStringException` errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade `awscurl` to a newer version (0.20+) where Python 3 compatibility for output encoding has been addressed.","message":"Early versions (around v0.19) had issues with Python 3's byte/string handling, leading to unparsable JSON output (prefixed with `b'`).","severity":"breaking","affected_versions":"<= 0.19"},{"fix":"Prefer `pip install awscurl` within a virtual environment. If using Homebrew, be aware of the Python versions it installs and how they interact with your system PATH. Consider running `awscurl` via Docker to isolate dependencies if conflicts arise.","message":"Using `brew install awscurl` on macOS can sometimes lead to conflicts with existing Python installations or break the AWS CLI due to dependency version mismatches.","severity":"gotcha","affected_versions":"All versions (when installed via Homebrew)"},{"fix":"Upgrade to `awscurl` v0.34 or later, which includes `botocore` as a default dependency. Alternatively, for older versions, ensure `pip install 'awscurl[awslibs]'` to include necessary AWS-related dependencies.","message":"Before v0.34, if using AWS SSO or complex AWS CLI profiles, `botocore` might not have been automatically installed or loaded, leading to `botocore package could not be loaded` errors.","severity":"gotcha","affected_versions":"< 0.34"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}