Implementation of awscurl written in Rust.
brew tap 1hakusai1/1hakusai1
brew install awscurl-rs
git clone [email protected]:1hakusai1/awscurl-rs.git
cd awscurl-rs
cargo install
AWS_PROFILE=your-profile awscurl https://example.com
# or
awscurl https://example.com --profile your-profile
AWS_ACCESS_KEY_ID=YOURACCESSKEYID AWS_SECRET_ACCESS_KEY=your/accesskey AWS_DEFAULT_REGION=ap-northeast-1 awscurl https://example.com
[profile source-profile-name]
region = ap-northeast-1
[profile assume-role-profile]
region = ap-northeast-1
role_arn = arn:aws:iam::000000000000:role/role-name
source_profile = source-profile-name
awscurl https://example.com --profile assume-role-profile
Most of the options are the same as those in curl.
awscurl https://example.com -X POST -d '{"example": "value"}' -H 'content-type: application/json' -H 'hoge: fuga' -v
> awscurl --help
Usage: awscurl [OPTIONS] <URL>
Arguments:
<URL>
Options:
-d, --data <DATA> Request body
-X, --request <METHOD> HTTP method (Ex. GET, POST, PUT ...)
-H, --header <HEADER> HTTP headers (Ex. content-type: application/json)
--service <SERVICE> AWS service name (Default: execute-api)
--region <REGION> AWS region
--profile <PROFILE> AWS profile
-v, --verbose
-h, --help Print help
-V, --version Print version