IoT AWS C3M1
IoT AWS C3M1
Overview
● What is the Cloud?
● Cloud options
What is the Cloud?
● Software runs on the internet instead of running on your computer
○ Google Docs
○ Web Mail
http/json
REST API
Virtual Machine Emulation of a computer
Flavors of Cloud Offerings
● IAAS - Infrastructure As A Service
Vs
● No capital costs
EC2 S3 RDS
ElastiCache Memcached
S3 FTP Server
DevOps
CodeCommit Git
CodeDeploy Jenkins
Kinesis Kafka
Takeaway or Resources
● Aws has a multitude of services that anyone can take advantage of
● https://www.expeditedssl.com/aws-in-plain-english
Systems Architecture
Overview
● Basic Architecture overview
● IOT-based Architecture
Web Architecture
Web Architecture
IoT
Edge Computing
● Instead of all devices connecting to one
cloud, multiple edge clouds manage
devices
● Each edge is in charge of its own devices
● Offloads compute power to the edge
● Edge brings lower latency to high
priority tasks
● Cloud handles low priority, but compute
intensive tasks.
Edge Computing
Takeaway or Resources
● https://aws.amazon.com/architecture/
● https://s3.amazonaws.com/awsmedia/architecturecenter/AWS_ac_ra_web
_01.pdf
● https://s3.amazonaws.com/awslambda-serverless-web-refarch/RefArch_B
logApp_Serverless.png
● https://d0.awsstatic.com/diagrams/product-page-diagrams/Diagrams_gre
engrass-core.png
● http://searchdatacenter.techtarget.com/definition/edge-computing
Homework
● Virtual Machines
○ Read about them and see how they differ from your typical computers
● Check out Azure and Google Cloud Platform
○ See what services they have to offer
○ See how they differ from AWS
● Create your own EC2 Instance
Create an AWS Account
Requirements
● What you need to sign-up for an account:
○ Email
○ Debit/Credit Card
■ You will not charged as long as you stay within usage limits
○ Phone Number
AWS Free Tier
● What you get for free for 12 months:
○ EC2 - 750 Hours
○ RDS - 750 Hours
○ S3 - 5 GB
○ And more!!
● What you get for free forever:
○ CodeCommit - 5 active users/month
○ Lambda - 1 Million requests/month
○ DynamoDB - 25 GB
○ Even more!!
AWS Educate
● What is it?
○ Amazon’s initiative to provide students with resources to learn how to use the cloud
○ Provides credits to use on AWS services not available to free tier
● Who is eligible?
○ Educators
○ Academic Researchers
○ Students
● What you get:
○ Up to $150 in credits
○ Training Course
○ More!!
AWS Educate Starter Account
● Types of Educate Accounts
○ AWS Account
○ AWS Educate Starter Account
● AWS Account
○ More credits
○ Requires credit card
○ Account persists after credits run out
● AWS Educate Starter Accounts
○ Less credits
○ No credit card required
○ Account closes after credits run out
Resources
● AWS resources provided in the readings!
○ AWS Free Tier
○ AWS Educate
AWS Permissions: IAM Identities
Identity and Access Management (IAM) Identities
● What are they?
○ Ways to organize permissions for diferrent resources
● What’s the point?
○ So that only admins have full access while new users have restricted access
○ Ex: Preventing a new hire from nuking your entire database
Identity and Access Management (IAM) Identities
● IAM Users
○ Name and Password
○ Access keys for API or CLI
○ Ex: Bob Seds
● IAM Groups
○ Collection of users
○ Everyone in group inherits the policies of that group
○ Managing policies related to common groups e.g. Admins, Database Team
● IAM Roles
○ Similar to users but can be assumed by any user
○ No credentials
○ Ex: Database Manager
IAM Users vs IAM Roles
● IAM Users
○ Only person working on an account
○ Multiple users
○ Want to use the command-line interface
● IAM Roles
○ Applications
○ Temporary acess
AWS Account Root User
● Spawned when you first create your account
● Full unrestricted access
● Not recommended for everyday use
● Instead, create an IAM user for yourself
Takeaways
● Separate levels of access to resources
● Create an IAM user for yourself
● Don’t use the root user for everyday purposes
● Keep your credentials secure
AWS Permissions: IAM Policies
Identity and Access Management (IAM) Policy
● What is it?
○ Document that defines permissions for certain users, groups, roles, or resources
● Components (Straight from AWS):
○ Effect – whether the policy allows or denies access
○ Action – the list of actions that are allowed or denied by the policy
○ Resource – the list of resources on which the actions can occur
○ Condition (Optional) – the circumstances under which the policy grants permission
Identity and Access Management (IAM) Policy
● What they look like?
○ Written in JSON
Identity and Access Management (IAM) Policy
● How to use them:
○ Attach to a IAM User or Group
○ Attach to a Resource
■ Needs to specify who is affected
■ Specified in principal field
Takeaways
● Assign IAM policies to specify level of access
● Great to limit the possibility of catastrophic accidents
AWS CLI and the SDK's
AWS Command Line Interface (CLI)
● Tool that provides commands to interact with AWS
● Same functionality that’s available on AWS Management Console
● Available on:
○ Linux terminal
○ MacOS terminal
○ Windows PowerShell
Takeaways
Homework
● Create an AWS account
● Create an IAM User with Admin Access
● Install the AWS CLI and configure it
REST API & JSON
REST
REST API
JSON
Amazon AWS
JSON
● Data Structure like XML (SOAP)
phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
JSON
student = { "Firstname" : "John", "Lastname" : "Starks", "sid" : "9343934"
}
● https://www.sitepoint.com/10-example-json-files/
RESTful API
● Representational state transfer
● http://bit.ly/2gAWSK7
Tesla Motors REST Api
● http://docs.timdorr.apiary.io/
● http://bit.ly/2yI1p85
REST API
Tesla Servers
REST
REST API
Amazon AWS
JSON Framework
● https://github.com/miloyip/nativejson-benchmark C++
● https://github.com/google/gson - Java