23 releases
new 0.1.22 | Apr 2, 2023 |
---|---|
0.1.21 | Mar 6, 2023 |
0.1.20 | Feb 20, 2023 |
0.1.18 | Jan 28, 2023 |
0.1.5 | Oct 31, 2022 |
#1129 in Command line utilities
28 downloads per month
17KB
154 lines
aoss-curl
Request to Amazon OpenSearch Service with SigV4 🔏
➜ aoss-curl -h
Request to Amazon OpenSearch Service with SigV4 🔏
Usage: aoss-curl [OPTIONS] --code <CODE> --uri <URI> <HOME>
Arguments:
<HOME> Home directory containing the AWS hidden folder [env: HOME=/Users/JohnDoe]
Options:
-r, --region <REGION> Name of the AWS region [default: eu-west-1]
-p, --profile <PROFILE> Name of the AWS profile [default: default]
-s, --suffix <SUFFIX> Suffix of the original AWS profile [default: noauth]
-c, --code <CODE> MFA code
-d, --duration <DURATION> Session duration in seconds [default: 3600]
-i, --identifier <IDENTIFIER> MFA device identifier (defaults to AWS username) [default: ]
-m, --method <METHOD> Method of the HTTP request [default: GET]
-u, --uri <URI> URI of the HTTP request
-b, --body <BODY> Body of the HTTP request [default: ]
-h, --help Print help
-V, --version Print version
Installation
aoss-curl is published on crates.io and can be installed with
cargo install aoss-curl
or via homebrew-tap with
brew install jhandguy/tap/aoss-curl
or downloaded as binary from the releases page.
Usage
Warning: aoss-curl requires an MFA code and uses aws-mfa for authenticating to AWS.
Add basic credentials in ~/.aws/credentials
:
[<profile_name>-noauth]
aws_access_key_id = <aws_access_key_id>
aws_secret_access_key = <aws_secret_access_key>
Note: make sure to add the
-noauth
suffix to the profile name
Run aoss-curl
:
aoss-curl -p <profile_name> -c <mfa_code> -u <opensearch_domain>/_cat/indices
Check output:
200 OK
green ...
Dependencies
~18–25MB
~519K SLoC