In this tutorial we will discuss how to configure the AWS for amazon user account and later we will see how to setup a new things and generate certificates to communicate with your IOT device using AWS MQTT services.
AWS User Account
For using the AWS services you need to have a user account and login using the AWS Login link
Existing users can directly login and directly jump to next. New users should register following the below steps.
Provide the valid mail id, user name and password to create an AWS account.
Enter the Company/Personnel contact Details
Provide the CreditCard details for payment.
Basic plan is free for first Year, other plans are chargeable.
We will look into the different plans as we proceed.
Here the Amazon will verify the details provided by you through phone call.
You will receive a verification call for the registered number and will be asked to entry the 4-digit verification code which is currently displayed on the screen. Once you enter the 4-digit code, verification should be completed as shown below.
Click the link that is marked with red box to view the plans and select according to your requirement. We will go with basic.
We are done with the registration, wait for couple of minutes to receive the registration confirmation mail.
Creating a new thing
After Login, click on Signin To Console to go to AWS dash board.
Now type AWS IOT and Select the AWS IOT (Connect Devices to Cloud) from drop down as shown below.
Now the AWS GetStarted Window will open only for the first time. Click on GetStarted to go to dash board.
Click on Register-->Things for registering a new Thing as shown below.
Now click on Create to create a new Thing.
Provide a unique Thing name and click on Create to proceed.
myTestThing is SuccessFul created as shown below.
Get the MQTT HOST name and thing name from Interact menu. These will be used to connect with AWS MQTT and also to subscribe/publish the topics.
Generate certificates for new thing
Go to Security menu and click on Create Certificate to register the certificates.
Click on the activate button to activate the certificates and download the certificate,private key and root CA as name them as below.
Define and Attach Policies
Go do AWS dash board and select the Security-->Policies and click on Create a Policy as shown below.
Define the policy for myTestThing as shown below
Now go back to Certificates and attach the policy that was defined above
Select the thing and attach the policies define above.
Verify the Attached Policies
Now verify whether the policies are attached to newly created thing as shown below.