Reader small image

You're reading from  Analytics for the Internet of Things (IoT)

Product typeBook
Published inJul 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787120730
Edition1st Edition
Languages
Right arrow
Author (1)
Andrew Minteer
Andrew Minteer
author image
Andrew Minteer

Andrew Minteer is currently the senior director, data science and research at a leading global retail company. Prior to that, he served as the director, IoT Analytics and Machine Learning at a Fortune 500 manufacturing company. He has an MBA from Indiana University with a background in statistics, software development, database design, cloud architecture, and has led analytics teams for over 10 years. He first taught himself to program on an Atari 800 computer at the age of 11 and fondly remembers the frustration of waiting through 20 minutes of beeps and static to load a 100-line program. He now thoroughly enjoys launching a 1 TB GPU-backed cloud instance in a few minutes and getting right to work. Andrew is a private pilot who looks forward to spending some time in the air sometime soon. He enjoys kayaking, camping, traveling the world, and playing around with his six-year-old son and three-year-old daughter.
Read more about Andrew Minteer

Right arrow

Chapter 4. Creating an AWS Cloud Analytics Environment

This chapter is a step-by-step walk-through of creating an AWS cloud environment. The environment is specifically geared toward analytics and uses AWS best practices. Along with screenshots and instructions on setting things up, there will be explanations of what is being done and why. This walk-through will incur AWS usage charges. Make sure to delete all the resources after the walk-through if you do not intend on keeping the environment running as the total cost could be over $130 USD for a full month. Starting and stopping the EC2 instances as needed can reduce the cost somewhat.

This chapter will cover the following topics:

  • AWS CloudFormation
  • Setting a best practice virtual private cloud setup:
    • NAT gateway
    • Bastion hosts
  • How to terminate and clean up the environment

The AWS CloudFormation overview


AWS CloudFormation is, putting it simply, an infrastructure as code. It is an AWS service, you do not need to install any additional software. This allows developers and system administrators to design and implement the entire network and server configurations directly from a code template file. CloudFormation handles the ordering and creation of the resources automatically when the template is implemented. When a template is launched to create resources, it is called a stack.

Think of a stack like architectural blueprints. The architect (you) hands the blueprints over to the contractor (AWS) to build it as per your specifications. The contractor knows how to order the construction jobs and what materials are needed.

You can create your own templates, use publicly available ones (such as on GitHub), or use AWS quick start templates. CloudFormation also has a visual designer to help lay out your planned infrastructure. Templates are saved as text files in either...

The AWS Virtual Private Cloud (VPC) setup walk-through


The walk-through assumes you already have the following set up:

  • AWS account: If you do not have an account, visit the AWS console page and follow the instructions to set up an account. The instructions are available at https://aws.amazon.com/free/.
  • Root accounts with Multi-Factor Authorization (MFA) active: This is essential for security purposes. If you have not turned on MFA, do it right away. Download an app on your phone such as Google Authenticator and set up MFA on your account. The instructions are available at https://aws.amazon.com/iam/details/mfa/.
  • IAM users with administrative rights and MFA active: Set up an IAM user for yourself with administrator rights to use for day-to-day operations. For security purposes, avoid using the root to log in. Also set up MFA for the IAM user.
  • Follow all other recommended steps on the IAM welcome screen to secure your account: Your security status on the page should be all green checkmarks and...

How to terminate and clean up the environment


If you do not intend on keeping the VPC environment or would like to reduce costs by eliminating it and recreating it later, follow these simple steps:

  1. Go to Services, then CloudFormation to return to the CloudFormation stack list.
  2. Delete the stacks one at a time, starting with the stack that has BastionStack in the name. To do this, click on the square to the left of the name to select the stack:
  1. Click the Actions button, then select Delete Stack:
  1. Confirm the delete by clicking on the Yes, Delete button. This will delete the bastion instances and the associated security groups:
  1. The status of the stack will change to DELETE_IN_PROGRESS. When the deletion is complete, the stack will be removed from the list. You can click on the refresh button (circular arrow) in the upper-right corner after a few minutes if you do not see a change:
  1. Repeat steps 2 through 5 for the stack with VPCStack in the name, then finally the remaining stacks with the name you...

Summary


In this chapter, we created a secure virtual private cloud in less than half an hour that is ready to support IoT analytics. We also reviewed how to delete and clean up the environment when no longer needed. We discussed AWS CloudFormation, NAT gateways, and Linux bastion hosts. You now have a secure and flexible place to launch large-scale analytics, which we will do later on in this book.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Analytics for the Internet of Things (IoT)
Published in: Jul 2017Publisher: PacktISBN-13: 9781787120730
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Andrew Minteer

Andrew Minteer is currently the senior director, data science and research at a leading global retail company. Prior to that, he served as the director, IoT Analytics and Machine Learning at a Fortune 500 manufacturing company. He has an MBA from Indiana University with a background in statistics, software development, database design, cloud architecture, and has led analytics teams for over 10 years. He first taught himself to program on an Atari 800 computer at the age of 11 and fondly remembers the frustration of waiting through 20 minutes of beeps and static to load a 100-line program. He now thoroughly enjoys launching a 1 TB GPU-backed cloud instance in a few minutes and getting right to work. Andrew is a private pilot who looks forward to spending some time in the air sometime soon. He enjoys kayaking, camping, traveling the world, and playing around with his six-year-old son and three-year-old daughter.
Read more about Andrew Minteer