Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[awscurl] Updates docs for downloading stable version #2170

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions awscurl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ command line options to help construct different type of request body.

## Downloading awscurl

You can download awscurl like this:
You can download `awscurl` like this:

```sh
wget https://publish.djl.ai/awscurl/awscurl \
# download stable release version:
curl -O https://publish.djl.ai/awscurl/0.28.0/awscurl \
&& chmod +x awscurl

# or download nightly release
curl -O https://publish.djl.ai/awscurl/awscurl \
&& chmod +x awscurl
```

Expand All @@ -22,11 +27,13 @@ You can build it using gradle:
```sh
./gradlew build
```

You will find a jar file in build/libs folder.

## Usage

### AWS Credentials

This tool uses the same ways as AWS CLI to load AWS credentials:
[Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)

Expand All @@ -35,13 +42,17 @@ This tool uses the same ways as AWS CLI to load AWS credentials:
#### Using java System properties

#### Using profile
You can use --profile option to use [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html).

You can use --profile option to
use [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html).

### Obtain region

region name is requird to sign SigV4 request. region can be obtained in following order:

1. passed by parameter --region
2. inferred from url if url using \[XXX.\]SERVICE.REGION-NAME.amazonaws.com or \[XXX.\]REGION-NAME.SERVICE.amazonaws.com format.
2. inferred from url if url using \[XXX.\]SERVICE.REGION-NAME.amazonaws.com or \[XXX.\]REGION-NAME.SERVICE.amazonaws.com
format.
3. get region name from ~/.aws/credentials file
4. get region name from ~/.aws/config file

Expand All @@ -58,6 +69,8 @@ awscurl -n sagemaker https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints
```

## Limitation

* Doesn't support [SigV4 Chunked upload](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html)
* This tool load request body into memory, the max size of body can up to 2G. The actual body is also limited by java heap size.
* This tool load request body into memory, the max size of body can up to 2G. The actual body is also limited by java
heap size.
* Unlike AWS CLI can find URL by itself, caller must specify AWS service endpoint url.