Skip to content

Instantly share code, notes, and snippets.

View dave-malone's full-sized avatar

Dave Malone dave-malone

  • Amazon Web Services
  • Tampa, FL
View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
"Resource": [
"arn:aws:iam::*:role/AWSCloudFormationStackSetExecutionRole"
],
@dave-malone
dave-malone / aws-lambda-kvm-gethlsstreamingurl.js
Last active August 27, 2018 15:31
AWS Lambda Function intended to be used by authorized callers to view a Kinesis Video Stream's HLS session URL.
const AWS = require('aws-sdk')
AWS.config.region = process.env.AWS_REGION
const kinesisvideo = new AWS.KinesisVideo({
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY
})
function getStreamingSessionURL(){
@dave-malone
dave-malone / aws-iot-update-thing-shadow-lambda-function.js
Last active May 25, 2022 05:57
AWS Lambda function example of how to update IoT Thing Shadows
const AWS = require('aws-sdk')
AWS.config.region = process.env.AWS_REGION
const AWS_IOT_CORE_ENDPOINT = process.env.MQTT_BROKER_ENDPOINT
const IOT_THING_NAME = process.env.THING_NAME
const iotdata = new AWS.IotData({
endpoint: AWS_IOT_CORE_ENDPOINT,
})
@dave-malone
dave-malone / bandwidth-speed-test-cloudwatch.js
Created August 21, 2018 15:15
A simple node program that uses the fast-speedtest-api npm package to test internet bandwidth and publishes it to CloudWatch
const FastSpeedtest = require("fast-speedtest-api")
const AWS = require('aws-sdk')
AWS.config.update({region: 'us-east-1'})
const cloudwatch = new AWS.CloudWatch()
let speedtest = new FastSpeedtest({
token: "INSERT-YOUR-TOKEN-HERE",
verbose: false,
timeout: 10000,
https: true,
@dave-malone
dave-malone / ds18b20-basicPubSub.py
Created August 9, 2018 19:33
AWS IoT Python program to send data from a DS18B20 sensor to AWS IoT Core
'''
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
@dave-malone
dave-malone / cloud-native-demo-steps.md
Last active November 28, 2018 21:48
Steps taken during the live coding demonstration delivered at the AWS User Group
@dave-malone
dave-malone / basicPubSub.py
Last active August 6, 2018 12:44
IoT basic pub sub sample modified to use a temperature sensor attached to the GPIO: aws-iot-device-sdk-python/samples/basicPubSub/basicPubSub.py
'''
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
@dave-malone
dave-malone / aws-iot-thing-esp32.md
Last active February 2, 2023 11:01
Install Amazon FreeRTOS on an ESP32 and make it a "thing"
@dave-malone
dave-malone / aws-iot-greengrass-core-raspberrypi.md
Last active March 6, 2022 19:23
AWS IoT Greengrass Core running on RaspberryPi
@dave-malone
dave-malone / aws-freertos-greengrass-setup.md
Last active June 22, 2023 21:07
AWS FreeRTOS to Greengrass Core setup

Requirements

This project was built with the following requirements in mind:

  • RaspberryPi 3
  • Espressif ESP32 DevKitC
  • AWS account with access to AWS IoT
  • Windows or OSX based machine
  • Python 2.7