Preparing the device with the Snowball Edge CLI – Configuring an AWS Snowcone Device to Be an IOT Gateway-1
When a Snow Family device first boots up, it is always locked. You will need the unlock key and manifest file from the preceding section to unlock the device for use.
Step 1 – Installing the AWS Snow CLI client
Download and install the AWS Snow CLI client. This is similar to the general-purpose AWS CLI utility but includes commands specific to Snow Family devices:
wget https://snowball-client.s3.amazonaws.com/latest/snowball-client-linux.tar.gz
tar -xvf ./snowball-client-linux.tar.gz
Note – Setting the build number
In the following command, make sure you replace buildnum with the build number of the client you downloaded. This can be seen by executing the ls command.
Now, add the AWS Snow CLI bin directory path to your PATH variable:
export PATH=$PATH:$HOME/snowball-client-linux-buildnum/bin/
Figure 12.21 – Adding the AWS Snow CLI bin directory to your PATH variable
More detailed information can be found in the Using the Snowball Edge Client section of the AWS Snow Family documentation.
Step 2 – Configuring the AWS Snow CLI
You must configure the Snowball Edge client with credentials similar to how you did this with the standard AWS CLI. Don’t worry that all the commands start with snowballEdge – we use the same utility for all AWS Snow Family devices:
snowballEdge configure
It will then ask you for the unlock code and path to the manifest file you downloaded earlier. It will also ask you for the default endpoint. This is the IP address of your Snow device that you configured on the LCD panel earlier. It must be formatted with https:// in front of it, as shown in the following figure:
Figure 12.22 – Configuring the Snowball Edge CLI utility
Step 3 – Unlocking your Snow device with the CLI
Issue the unlock-device command:
snowballEdge unlock-device
This will take a few minutes:
Figure 12.23 – Unlocking the Snow device
Step 4 – Retrieving the output of the unlocking procedure
Check to make sure everything is working properly with the describe-device command:
snowballEdge describe-device
You should receive output like that shown in the following figure:
Figure 12.24 – Output from the snowballEdge describe-device command
Three important things are highlighted in red:
State: UNLOCKED. This means that the process is complete and the device is ready for use.
IpAddress: In this case, it has a value of 192.168.100.101, which is what we set this particular RJ45 interface to statically from the LCD panel. This refers to the IP that the Snow Family device itself is using for management and routing tasks (where applicable). Any EC2 instances we start on this interface will get their own separate IP and MAC address.
PhysicalNetworkInterfaceId: Copy this value, as we will need it in subsequent steps so that we can start EC2 instances attached to this interface. Alternatively, you can select a different RJ45 interface or even a Wi-Fi interface for this purpose if you wish.