Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawkey committed Jun 26, 2024
1 parent 99298bf commit f021795
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/linux/s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,27 @@ Both a CLI and Python SDK for S3 and other storage systems.
```bash
pip install megfile

### configure

# use env to config s3 access key
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_ENDPOINT_URL=https://xxx # NOTE: different from s5cmd!

# or config with CLI
megfile config s3 AK SK --endpoint-url http://<ip>:<port>
# or config with CLI (will modify ~/.aws/credentials)
megfile config s3 <AK> <SK> --endpoint-url http://xxx

### megfile also supports configure multiple s3 endpoints!

# use env var (not recommended due to capital letters)
export PROFILE1__AWS_ACCESS_KEY_ID=xxx
export PROFILE1__AWS_SECRET_ACCESS_KEY=xxx
export PROFILE1__AWS_ENDPOINT_URL=https://xxx

# config with CLI
megfile config s3 <AK> <SK> --endpoint-url http://xxx --profile-name profile1

# these named profiles can be used as `s3+profile1://bucket/file`
```

### CLI
Expand All @@ -148,6 +162,9 @@ megfile config s3 AK SK --endpoint-url http://<ip>:<port>
megfile ls s3://bucket
megfile cat s3://bucket/file
megfile cp s3://bucket/file local_file

# named profile
megfile ls s3+profile1://bucket/file
```

Unfortunately you cannot perform bucket-level operations with `megfile` CLI:
Expand Down

0 comments on commit f021795

Please sign in to comment.