sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
Remove swap space once done
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, |
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, | |
}) |
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(){ |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"sts:AssumeRole" | |
], | |
"Resource": [ | |
"arn:aws:iam::*:role/AWSCloudFormationStackSetExecutionRole" | |
], |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": [ | |
"arn:aws:iam::{account-id}:role/LandingZoneLambdaRoleADConnector", | |
"arn:aws:iam::{account-id}:role/AWSCloudFormationStackSetAdministrationRole", | |
"arn:aws:iam::{account-id}:role/StateMachineLambdaRoleADConnector", |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Create Okta IDP and default roles on all accounts. | |
Metadata: | |
AWS::CloudFormation::Interface: | |
ParameterGroups: | |
- | |
Label: | |
default: "Okta SAML IDP" | |
Parameters: |
[ | |
{ | |
"ParameterKey": "EnableAdminRole", | |
"ParameterValue": "true" | |
}, | |
{ | |
"ParameterKey": "EnablePowerUserRole", | |
"ParameterValue": "true" | |
}, | |
{ |
- name: DefaultOktaRoles | |
baseline_products: | |
- AWS-Landing-Zone-Account-Vending-Machine | |
template_file: templates/aws_baseline/aws-landing-zone-default-okta-roles.template | |
parameter_file: parameters/aws_baseline/aws-landing-zone-default-okta-roles.json | |
deploy_method: stack_set |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
Remove swap space once done
from avro.datafile import DataFileWriter | |
from avro.io import DatumWriter | |
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient | |
import avro.schema | |
import logging | |
import time | |
import os | |
avro_users_schema_file = "user.avsc" | |
avro_users_file = "users.avro" |