Walkthrough of what you’ve created – Configuring an AWS Snowcone Device to Be an IOT Gateway

Now that your AWS Snowcone device is configured as an AWS IoT Greengrass v2 Core device, let’s go over what that actually means.

Controlling your EC2 instance remotely

AWS IoT offers a feature called Secure Tunnel that allows you to remotely connect to a device anywhere in the world from the AWS Management Console. As long as the AWS IoT Greengrass v2 agent can reach AWS over the internet, you will be able to connect.

Log in to the AWS Management Console and navigate to IoT Core > Manage > All devices > Things > Your Snowcone name. Click on Create secure tunnel, as shown in the next figure:

Figure 12.35 – Initiating the creation of a secure tunnel

Accept the defaults to use the Quick setup method, and click Next:

Figure 12.36 – Using the Quick setup method

After this, you will be asked to confirm once again and offered the opportunity to download access tokens. This is not necessary for what we want to do, so simply click Done.

At this point, you will be taken to the detail page of the secure tunnel. In the lower right of the screen, under SSH, click Connect, as shown in the next figure:

Figure 12.37 – Connecting to the secure tunnel

You will then see a popup asking how you wish to authenticate. Use the same method you would if you were connecting normally over SSH. Set the username to ec2-user and upload the EC2 keypair you created earlier when you launched the instance. An example is shown in the next figure:

Figure 12.38 – Authenticating to the secure tunnel

Depending upon the latency of your internet connection, this may take a moment. Once it is finished, you will be able to interact with the EC2 instance you deployed onto the device from within the AWS Management Console. This is shown in the following figure:

Figure 12.39 – Connecting to SSH from within the AWS Management Console

Leave a comment

Your email address will not be published. Required fields are marked *