Crates.io | aoss-curl |
lib.rs | aoss-curl |
version | |
source | src |
created_at | 2022-10-30 21:24:50.612257 |
updated_at | 2024-12-03 20:12:37.215935 |
description | Request to Amazon OpenSearch Service with SigV4 🔏 |
homepage | |
repository | https://github.com/jhandguy/aoss-curl |
max_upload_size | |
id | 701665 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Request to Amazon OpenSearch Service with SigV4 🔏
➜ aoss-curl
Request to Amazon OpenSearch Service with SigV4 🔏
Usage: aoss-curl <COMMAND>
Commands:
no-auth Request to Amazon OpenSearch Service with SigV4
aws-mfa Request to Amazon OpenSearch Service with SigV4 and aws-mfa
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
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.
Run the aoss-curl no-auth
command:
aoss-curl no-auth -u <opensearch_domain>/_cat/indices
200 OK
green ...
aws-mfa can be used for authenticating to AWS with MFA before requesting to Amazon OpenSearch Service.
Add default region in ~/.aws/config
:
[profile <profile_name>-noauth]
region = <aws_region>
[profile <profile_name>]
region = <aws_region>
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 the aoss-curl aws-mfa file
command:
aoss-curl aws-mfa file -p <profile_name> -c <mfa_code> -u <opensearch_domain>/_cat/indices
200 OK
green ...
Export default region and basic credentials as environment variables:
export AWS_REGION=<aws_region>
export AWS_ACCESS_KEY_ID=<aws_access_key_id>
export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
Run the aoss-curl aws-mfa env
command:
aoss-curl aws-mfa env -c <mfa_code> -u <opensearch_domain>/_cat/indices
200 OK
green ...