Skip to content

Commit 49cd197

Browse files
committed
Provide updated documentation
1 parent 05d806b commit 49cd197

File tree

4 files changed

+68
-19
lines changed

4 files changed

+68
-19
lines changed

docs/gdk.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,27 @@ This guide covers deploying the component using the Greengrass Development Kit
55

66
## Prerequisites
77

8-
- [GDK CLI](https://github.com/aws-greengrass/aws-greengrass-gdk-cli) installed
8+
- [GDK CLI](https://github.com/aws-greengrass/aws-greengrass-gdk-cli)
9+
- Follow Install GDK step below if not installed already.
910
- AWS credentials configured
11+
- Easiest is to export a permissive role's token
1012
- S3 bucket for component artifacts
11-
- Built binaries (see [BUILD.md](BUILD.md))
13+
- Built localproxy binary (see [localproxy.md](localproxy.md))
1214

1315
Install GDK:
1416

1517
```sh
1618
pip3 install git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git@v1.6.0
1719
```
1820

21+
Exporting AWS Credentials
22+
23+
```shell
24+
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
25+
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
26+
export AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN>
27+
```
28+
1929
## Configuration
2030

2131
Edit `gdk-config.json`:

docs/localproxy.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
## Overview
44

55
This component requires a prebuilt
6-
[localproxy binary](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/tree/main)
6+
[localproxy binary version >=v3.2.0](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/tree/main)
77
from AWS IoT Secure Tunneling.
88

9-
Tested with
10-
[commit feb59e2](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/commit/feb59e268c8f4f1c7450f3a510963e84cc397ac7).
11-
129
If you want arm64, arm7l or x86 linux build these are available as pre-built
1310
binaries with the repo's
1411
[latest release](https://github.com/aws-samples/aws-iot-securetunneling-localproxy/releases/).
@@ -22,24 +19,31 @@ target device. For cross-compilation, see the
2219
### Install Dependencies
2320

2421
```sh
25-
sudo apt update
26-
27-
# Install boost 1.87
28-
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz -O /tmp/boost_1_87_0.tar.gz
29-
tar xzvf /tmp/boost_1_87_0.tar.gz
30-
cd boost_1_87_0
31-
./bootstrap.sh
32-
sudo ./b2 install link=static
33-
34-
# Install other dependencies
35-
sudo apt install zlib1g protobuf-compiler libprotobuf-dev libssl-dev
22+
sudo apt-get update && sudo apt-get install -y build-essential cmake wget git libssl-dev zlib1g-dev
23+
24+
# Install Boost 1.87.0
25+
wget -q https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz -O boost.tar.gz
26+
tar xzf boost.tar.gz && cd boost_1_87_0
27+
./bootstrap.sh --prefix=/usr/local
28+
sudo ./b2 install link=static -j$(nproc)
29+
cd ..
30+
31+
# Install Protobuf 3.17.3
32+
wget -q https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O protobuf.tar.gz
33+
tar xzf protobuf.tar.gz && cd protobuf-3.17.3
34+
mkdir -p build && cd build
35+
cmake ../cmake -DCMAKE_INSTALL_PREFIX=/usr/local -Dprotobuf_BUILD_TESTS=OFF
36+
make -j$(nproc) && sudo make install
37+
cd ../..
3638
```
3739

3840
### Build
3941

4042
```sh
41-
cmake -B build -DCMAKE_BUILD_TYPE=Release -DLINK_STATIC_OPENSSL=OFF -DBUILD_TESTS=OFF
42-
make -C build/
43+
mkdir -p build && cd build
44+
cmake .. -DBUILD_TESTS=OFF -DLINK_STATIC_OPENSSL=OFF
45+
make -j$(nproc)
46+
strip bin/localproxy
4347
```
4448

4549
The resulting binary should be approximately 4MB.

docs/usage.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,39 @@ Once deployed, create tunnels via the AWS Console:
2525
4. Wait for connection to establish
2626
5. Access your device through the web UI
2727

28+
## AWS CLI Alternative
29+
30+
Create a tunnel:
31+
32+
```bash
33+
aws iotsecuretunneling open-tunnel \
34+
--destination-config thingName=<YOUR_THING_NAME>,services=SSH
35+
```
36+
37+
List tunnels:
38+
39+
```bash
40+
aws iotsecuretunneling list-tunnels
41+
```
42+
43+
Describe a tunnel:
44+
45+
```bash
46+
aws iotsecuretunneling describe-tunnel --tunnel-id <TUNNEL_ID>
47+
```
48+
49+
Close a tunnel:
50+
51+
```bash
52+
aws iotsecuretunneling close-tunnel --tunnel-id <TUNNEL_ID>
53+
```
54+
55+
Connect using localproxy with the source access token:
56+
57+
```bash
58+
./localproxy -r <REGION> -s <SOURCE_ACCESS_TOKEN> -d localhost:22
59+
```
60+
2861
## Additional Resources
2962

3063
- [AWS Secure Tunneling Tutorial](https://docs.aws.amazon.com/iot/latest/developerguide/tunneling-tutorial-quick-setup.html)

misc/dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ DBUILD
1010
DCMAKE
1111
DEPENDS
1212
DLINK
13+
Dprotobuf
1314
endforeach
1415
endif
1516
endmacro
@@ -28,6 +29,7 @@ GLIBCXX
2829
greengrass
2930
greengrassv2
3031
INTERPROCEDURAL
32+
iotsecuretunneling
3133
iwyu
3234
journalctl
3335
libc

0 commit comments

Comments
 (0)