Monday, November 8, 2021

Demo: Amazon AWS S3 - Static Web Site Hosting

step1: Login to AWS console and create S3 bucket giving unique name for the bucket. Uncheck the block all public access. since Lab is to create static website so it needs to be accessed via public channel


step2: Select the bucket and go to properties. Scroll to the bottom of page and edit static website hosting section. Set it to Enable and type default.html for index page and save changes


step3: go to objects under bucket and upload any sample default.html file from local machine. After file is uploaded, set the permission of file to Public/ Everyone read.

Final Step: Go back to bucket, properties and see the static website section to copy the endpoint. Paste it in browser and enter.




Monday, November 1, 2021

Implement the Azure IoT Hub Demo: 

In this research room, we will go thru steps to configure IoT hub and add device to authenticate connection with online Raspberry Pi device simulator. Sensor data and messages will be passed from the Raspberry Pi to Azure IoT Hub connection which shows in view metrics for the messaging activity in Azure Portal. 

a) Go to URL https://portal.azure.com and Login to the account. On the Azure portal menu or from the Home page, select Create a resource and search for IoT Hub and click create as below. 

b) Fill out the IoT Hub information, then click on Next: Networking. IoT Hub name must be unique. Select Free Tier or S1: Standard Tier 


c) Review the options and click create to wait for the deployment to finish and then go to Resources


d) Search Device and Add Device

e) type device name, click save and copy the primary connection string


f) Test device using Raspberry Pi online Simulator. 
Launch Raspberry Pi Simulator site( https://azure-samples.github.io/raspberry-pi-web-simulator/). 
In the code area on the right, locate the line with ‘const connectionString =’ and replace it with the connection string copied from the Azure portal.

Click on the Run button(below the code area) to run the application. The console output should show the sensor data and messages that are sent from the Raspberry Pi simulator to your Azure IoT Hub. Data and messages are sent each time the Raspberry Pi simulator LED flashes. Click on Stop button to stop sending data


g) go back to Azure Portal to check IoT Hub Overview page to see the matrix and data. Change your timeframe in the show data for last to see data in the last hour.