{"id":28042298,"url":"https://github.com/ivoronin/amzcurl","last_synced_at":"2026-05-09T14:07:41.729Z","repository":{"id":291835212,"uuid":"978932107","full_name":"ivoronin/amzcurl","owner":"ivoronin","description":"A minimal wrapper around curl that adds AWS SigV4 authentication using credentials from the AWS SDK and automatic service detection.","archived":false,"fork":false,"pushed_at":"2025-05-06T18:49:23.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T19:47:08.793Z","etag":null,"topics":["aws","curl","devops","sigv4"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivoronin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T18:19:27.000Z","updated_at":"2025-05-06T19:03:40.000Z","dependencies_parsed_at":"2025-05-06T19:47:13.132Z","dependency_job_id":"dd3aaace-5789-4c6e-acc2-15c4ed3fc43f","html_url":"https://github.com/ivoronin/amzcurl","commit_stats":null,"previous_names":["ivoronin/amzcurl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Famzcurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Famzcurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Famzcurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Famzcurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivoronin","download_url":"https://codeload.github.com/ivoronin/amzcurl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253578570,"owners_count":21930575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","curl","devops","sigv4"],"created_at":"2025-05-11T14:25:39.089Z","updated_at":"2026-05-09T14:07:41.721Z","avatar_url":"https://github.com/ivoronin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amzcurl\n\nCurl wrapper that injects AWS SigV4 authentication using credentials from the AWS SDK credential chain\n\n[![CI](https://github.com/ivoronin/amzcurl/actions/workflows/test.yml/badge.svg)](https://github.com/ivoronin/amzcurl/actions/workflows/test.yml)\n[![Release](https://img.shields.io/github/v/release/ivoronin/amzcurl)](https://github.com/ivoronin/amzcurl/releases)\n\n[Overview](#overview) · [Features](#features) · [Installation](#installation) · [Usage](#usage) · [Configuration](#configuration) · [Requirements](#requirements) · [License](#license)\n\n```bash\n# Before: manually constructing SigV4 with curl\ncurl --aws-sigv4 \"aws:amz:us-west-2:s3\" \\\n  --user \"$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY\" \\\n  -H \"x-amz-security-token: $AWS_SESSION_TOKEN\" \\\n  https://my-bucket.s3.us-west-2.amazonaws.com/file.txt\n\n# After: credentials and signing handled automatically\namzcurl https://my-bucket.s3.us-west-2.amazonaws.com/file.txt\n```\n\n## Overview\n\namzcurl discovers AWS credentials using the AWS SDK for Go v2 credential chain (environment variables, shared credentials file, EC2/ECS instance metadata). It parses the request URL to detect the AWS service and region, then passes signing flags (`--aws-sigv4`, `--user`, session token header) to curl via a temporary config file. All other arguments pass through to curl unchanged.\n\n## Features\n\n- Discovers credentials from full AWS SDK chain (env vars, `~/.aws/credentials`, `~/.aws/config`, EC2/ECS IMDS, SSO)\n- Auto-detects service name and region from standard AWS endpoint URLs\n- Supports named profiles via `--profile`\n- Supports manual region and service override via `--region` and `--service`\n- Handles session tokens for temporary credentials (IAM roles, SSO)\n- Supports standard, dual-stack, FIPS, and Chinese region endpoints\n- All curl arguments pass through unchanged\n\n## Installation\n\n### GitHub Releases\n\nDownload from [Releases](https://github.com/ivoronin/amzcurl/releases).\n\n### Homebrew\n\n```bash\nbrew install ivoronin/tap/amzcurl\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/ivoronin/amzcurl.git\ncd amzcurl\ngo build -o amzcurl ./cmd/amzcurl\n```\n\n## Usage\n\n```\namzcurl [--profile PROFILE] [--region REGION] [--service SERVICE] [curl args...]\n```\n\n### S3\n\n```bash\n# List bucket contents\namzcurl https://my-bucket.s3.us-west-2.amazonaws.com/\n\n# Download file\namzcurl -o file.txt https://my-bucket.s3.us-west-2.amazonaws.com/file.txt\n\n# Upload file\namzcurl -X PUT -T file.txt https://my-bucket.s3.us-west-2.amazonaws.com/file.txt\n```\n\n### DynamoDB\n\n```bash\namzcurl -X POST https://dynamodb.us-west-2.amazonaws.com/ \\\n  -H \"Content-Type: application/x-amz-json-1.0\" \\\n  -H \"X-Amz-Target: DynamoDB_20120810.ListTables\" \\\n  -d '{}'\n```\n\n### Named Profile\n\n```bash\namzcurl --profile production https://my-bucket.s3.us-west-2.amazonaws.com/\n```\n\n### Explicit Region and Service\n\nFor non-standard endpoints or when auto-detection fails:\n\n```bash\namzcurl --service execute-api --region us-east-1 \\\n  https://abc123.execute-api.us-east-1.amazonaws.com/prod/resource\n```\n\n### Version\n\n```bash\namzcurl --version\n```\n\n## Configuration\n\namzcurl uses the AWS SDK for Go v2 default credential chain. No tool-specific configuration is needed.\n\n### Credential Chain Order\n\n1. Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`)\n2. Shared credentials file (`~/.aws/credentials`)\n3. Shared config file (`~/.aws/config`) with profile support\n4. EC2/ECS instance metadata service (IMDS)\n5. SSO credentials when configured\n\n### AWS Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `AWS_ACCESS_KEY_ID` | Access key ID |\n| `AWS_SECRET_ACCESS_KEY` | Secret access key |\n| `AWS_SESSION_TOKEN` | Session token for temporary credentials |\n| `AWS_PROFILE` | Named profile to use |\n| `AWS_REGION` | Default region |\n| `AWS_CONFIG_FILE` | Path to config file (default: `~/.aws/config`) |\n| `AWS_SHARED_CREDENTIALS_FILE` | Path to credentials file (default: `~/.aws/credentials`) |\n\n## Requirements\n\n- curl 8.5 or newer (required for `--aws-sigv4` flag; newer versions recommended as SigV4 bugs have been fixed in recent releases)\n- Valid AWS credentials accessible via the SDK credential chain\n\n## License\n\n[GPL-3.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoronin%2Famzcurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivoronin%2Famzcurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoronin%2Famzcurl/lists"}