Skip to content

Commit

Permalink
update aws docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdnajac committed Oct 14, 2024
1 parent b2baadc commit 516a362
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
33 changes: 31 additions & 2 deletions docs/AWS/S3.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,44 @@ Using [mountpoint-s3](https://github.com/awslabs/mountpoint-s3):

1. Install:

On Ubuntu:

```sh
wget https://s3.amazonaws.com/mountpoint-s3-release/latest/x86_64/mount-s3.deb
sudo apt-get install ./mount-s3.deb -y && rm mount-s3.deb
```

On macOS:

```sh
brew install --cask macfuse # install the prerequisite FUSE library
wget https://s3.amazonaws.com/mountpoint-s3-release/latest/arm64/mount-s3.tar.gz
sudo mkdir -p /opt/aws/mountpoint-s3 && sudo tar -C /opt/aws/mountpoint-s3 -xzf ./mount-s3.tar.gz
export PATH=$PATH:/opt/aws/mountpoint-s3/bin # add to .zshrc
```

2. Mount:

```sh
mount-s3 my-bucket /mnt/s3
mkdir -vp /mnt/s3/my-bucket
mount-s3 my-bucket /mnt/s3/my-bucket
```

For more information, refer to the
[Mountpoint S3 documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mountpoint.html).

### Quick start

Create mountpoints for each bucket you have access to:

```sh
for bucket in $(aws s3 ls | awk '{print $3}'); do
mkdir -vp ./s3/$bucket
mount-s3 $bucket ./s3/$bucket
done
```

For more information, refer to the [Amazon S3 Developer Guide](https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html).
> [!CAUTION]
> This command will mount all buckets you have access to in the present working
> directory. Ensure you have the necessary permissions and that this is where
> you want to mount the buckets.
11 changes: 10 additions & 1 deletion docs/AWS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip
unzip awscliv2.zip && sudo ./aws/install && rm -rf ./awscliv2.zip ./aws
```

For other operating systems, refer to the [official installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
For other operating systems, refer to the
[official installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

## Shell Completion Setup

Set up shell completion for the AWS CLI so you can use tab to autocomplete
commands and options.

### Bash

Add to your `~/.bashrc`:
Expand All @@ -37,6 +41,11 @@ autoload -Uz compinit && compinit
complete -C '/usr/local/bin/aws_completer' aws
```

> [!IMPORTANT]
> If you installed the AWS CLI in a different location, update the path
> accordingly. For example, if you installed it using homebrew, the path
> might be `/opt/homebrew/bin/aws_completer`.
## AWS CLI Configuration

Set up your AWS credentials:
Expand Down
17 changes: 13 additions & 4 deletions docs/command-line/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ shell. Checkout the [quick reference](quick-reference.md) for common commands.
## Terminal

The "terminal" is the interface between you and the shell. It's also referred to as the "command line" or the "console". Various programs can serve as a terminal, such as:
The "terminal" is the interface between you and the shell.
It's also referred to as the "command line" or the "console".
Various programs can serve as a terminal, such as:

- `iTerm` on macOS
- `cmd` on Windows
Expand All @@ -38,9 +40,16 @@ include:
- `zsh` (the default on macOS)

> [!TIP]
> For maintainability and portability, it's recommended to write scripts in `bash` and be explicit about it. For an interesting discussion on this topic, check out this [Stack Overflow post](https://unix.stackexchange.com/questions/697052/why-should-i-care-about-posix-if-im-writing-bash-scripts).
> For more information on `bash`, see the [Bash Guide](bash.md).
> section.
> For maintainability and portability, it's recommended to write scripts in `bash` and be explicit about it.
> For an interesting discussion on this topic, check out this
> [Stack Overflow post](https://unix.stackexchange.com/questions/697052/why-should-i-care-about-posix-if-im-writing-bash-scripts).
Read through the [bash guide](bash.md) for more information on the writing and
executing shell scripts.

## Windows Subsystem for Linux (WSL)

Windows users can run a Linux distribution on Windows using WSL. This allows you
to run Linux command-line tools and utilities directly on Windows without
needing a virtual machine or dual-boot setup. If you want to use WSL, follow the
[installation instructions](https://docs.microsoft.com/en-us/windows/wsl/install).

0 comments on commit 516a362

Please sign in to comment.