I hereby claim:
- I am macbutch on github.
- I am markbutcher (https://keybase.io/markbutcher) on keybase.
- I have a public key ASALFqSCCKL35QtMaZ916Lf8-vk0e_YePJQm81XeX_ylaQo
To claim this, I am signing this object:
const AppSyncClient = (credentials) => { | |
return new AWSAppSyncClient({ | |
url: APPSYNC_ENDPOINT, | |
region: APPSYNC_REGION, | |
auth: { | |
type: 'AWS_IAM', | |
credentials: credentials | |
}, | |
disableOffline: true |
import AWS from 'aws-sdk' | |
import { AWSAppSyncClient } from 'aws-appsync' | |
const AwsCredentials = () => { | |
return new Promise((resolve, reject) => { | |
const options = { | |
httpOptions: { | |
key: fs.readFileSync('./privateKey'), | |
cert: fs.readFileSync('./certificate'), | |
ca: [ |
"dependencies": { | |
"apollo-cache-inmemory": "^1.1.0", | |
"apollo-client": "^2.0.3", | |
"apollo-link": "^1.0.3", | |
"apollo-link-http": "^1.2.0", | |
"aws-appsync": "^1.0.23", | |
"aws-iot-device-sdk": "^2.2.1", | |
"aws-sdk": "^2.273.1", | |
"binary-parser": "^1.3.2", | |
"concentrate": "^0.2.3", |
resource "aws_iot_policy" "thing_policy" { | |
name = "iot-thing-policy" | |
policy = <<POLICY | |
{ | |
"Version": "2012-10-17", | |
"Statement": { | |
"Effect": "Allow", | |
"Action": "iot:AssumeRoleWithCertificate", |
resource "aws_iam_role" "iot_access" { | |
name = "iot-access" | |
assume_role_policy = <<POLICY | |
{ | |
"Version": "2012-10-17", | |
"Statement": { | |
"Effect": "Allow", | |
"Principal": {"Service": "credentials.iot.amazonaws.com"}, | |
"Action": "sts:AssumeRole" |
I hereby claim:
To claim this, I am signing this object: