So, here is the output/log from when I do the setup.sh script. Not sure where to start really, there are quite a number of errors and warnings. Any help would be appreciated!
Thanks
Thomas
linaro@linaro-alip:~/Documents/arrow/aws-iot-dragonconnect-c/scripts$ ./setup.sh
################################################
Welcome to Arrow’s DragonConnect for Amazon AWS
This script will setup and provision your DragonConnect
################################################
DragonConnect should exist at /home/linaro/Documents/arrow/aws-iot-dragonconnect-c
Amazon AWS Account Number:
730096829334
Using eu-west-1 as AWS Region
Enter a Stage (Default is dev, Typical Stages are prod,test,qa):
dev
Using dev as API Stage
Enter a S3 Identifier (Default with be a random hash. Typical Identifiers can be something like Your Username):
crayfish
Using crayfish as S3 Identifier
***Creating Config for Arrow and AWS…
***Creating Amazon IAM and IoT Elements…
dragonconnect-config@0.1.0 node_modules/dragonconnect-config
Role DragonConnect-ApiGateway-2955 already exists.
Role DragonConnect-IoT-2955 already exists.
Role DragonConnect-Lambda-2955 already exists.
IoT Policy of DragonConnect already exists
IoT Topic Rule of DragonConnectAudioEvents already exists
Setting the IoT logging options
Table DragonConnect-audioEvents already exists
***Modifying Amazon lambda functions…
npm WARN package.json dragonconnect-lambda@0.1.0 No README data
dragonconnect-config@0.1.0 node_modules/dragonconnect-config
npm ERR! error rolling back Error: EACCES: permission denied, unlink ‘/usr/local/bin/grunt’
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back grunt-cli@1.2.0 { [Error: EACCES: permission denied, unlink ‘/usr/local/bin/grunt’]
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: ‘EACCES’,
npm ERR! error rolling back syscall: ‘unlink’,
npm ERR! error rolling back path: ‘/usr/local/bin/grunt’ }
npm ERR! Error: EACCES: permission denied, unlink ‘/usr/local/bin/grunt’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, unlink ‘/usr/local/bin/grunt’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘/usr/local/bin/grunt’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 4.4.23-linaro-lt-qcom
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “grunt-cli”
npm ERR! cwd /home/linaro/Documents/arrow/aws-iot-dragonconnect-c/lambda
npm ERR! node -v v4.4.3
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/bin/grunt
npm ERR! syscall unlink
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! stack Error: EACCES: permission denied, unlink ‘/usr/local/bin/grunt’
npm ERR! stack at Error (native)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/linaro/Documents/arrow/aws-iot-dragonconnect-c/lambda/npm-debug.log
npm ERR! not ok code 0
npm WARN package.json dragonconnect-lambda@0.1.0 No README data
Loading “Gruntfile.js” tasks…ERROR
>> Error: Cannot find module ‘…/lang/isNative’
Warning: Task “create” not found. Use --force to continue.
Aborted due to warnings.
***Configuring Amazon API gateway…
Detected 2955 as API Gateway Extension
./setup.sh: line 268: dragonconnect.yaml: Permission denied
Picked up JAVA_TOOL_OPTIONS: -Dgnu.io.rxtx.SerialPorts=/dev/tty96B0
2016-11-04 17:39:20,678 INFO - Using API Gateway endpoint https://apigateway.eu-west-1.amazonaws.com
2016-11-04 17:39:28,875 INFO - Attempting to create API from Swagger definition. Swagger file: dragonconnect.yaml
reading from dragonconnect.yaml
2016-11-04 17:39:30,032 WARN - no property from integer, long, {ENUM=null, TITLE=null, DESCRIPTION=The time the event occurred in seconds from the Epoch, UTC.
, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=integer, FORMAT=long}
2016-11-04 17:39:30,641 INFO - Parsed Swagger with 4 paths
2016-11-04 17:39:30,642 INFO - Creating API with name Arrow DragonConnect
2016-11-04 17:39:32,185 INFO - Removing default model Empty
2016-11-04 17:39:32,511 INFO - Removing default model Error
2016-11-04 17:39:32,879 INFO - Creating model for api id 11w1czyng4 with name AudioEvent
2016-11-04 17:39:33,849 INFO - Generated json-schema for model AudioEvent: {“type”:“object”,“required”:[“volume”],“properties”:{“volume”:{“type”:“string”,“description”:“Whether the volume was increased or decreased.\n”,“enum”:[“increase”,“decrease”]}},“definitions”:{}}
2016-11-04 17:39:34,167 INFO - Creating model for api id 11w1czyng4 with name AudioEventList
2016-11-04 17:39:34,210 INFO - Generated json-schema for model AudioEventList: {“type”:“array”,“items”:{"$ref":"#/definitions/AudioEvent"},“definitions”:{“AudioEvent”:{“type”:“object”,“required”:[“volume”],“properties”:{“volume”:{“type”:“string”,“description”:“Whether the volume was increased or decreased.\n”,“enum”:[“increase”,“decrease”]}}}}}
2016-11-04 17:39:34,538 INFO - Creating model for api id 11w1czyng4 with name LED
2016-11-04 17:39:34,597 INFO - Generated json-schema for model LED: {“type”:“object”,“required”:[“active”],“properties”:{“active”:{“type”:“boolean”,“description”:“True if the LED is active, false if it is inactive.\n”,“default”:false}},“definitions”:{}}
2016-11-04 17:39:34,956 INFO - Creating model for api id 11w1czyng4 with name Thing
2016-11-04 17:39:35,952 INFO - Generated json-schema for model Thing: {“type”:“object”,“required”:[“thingId”],“properties”:{“thingId”:{“type”:“string”,“description”:“The attribute name.\n”,“minLength”:1,“maxLength”:255,“pattern”:"^[a-zA-Z0-9_-]$"},“attributes”:{“type”:“object”,“description”:“The attributes of a thing.\n”,“additionalProperties”:{“type”:“string”}}},“definitions”:{}}
2016-11-04 17:39:36,335 INFO - Creating model for api id 11w1czyng4 with name ThingList
2016-11-04 17:39:36,445 INFO - Generated json-schema for model ThingList: {“type”:“array”,“items”:{"$ref":"#/definitions/Thing"},“definitions”:{“Thing”:{“type”:“object”,“required”:[“thingId”],“properties”:{“thingId”:{“type”:“string”,“description”:“The attribute name.\n”,“minLength”:1,“maxLength”:255,“pattern”:"^[a-zA-Z0-9_-]$"},“attributes”:{“type”:“object”,“description”:“The attributes of a thing.\n”,“additionalProperties”:{“type”:“string”}}}}}}
2016-11-04 17:39:36,854 INFO - Creating model for api id 11w1czyng4 with name Error
2016-11-04 17:39:36,881 INFO - Generated json-schema for model Error: {“type”:“object”,“required”:[“message”],“properties”:{“message”:{“type”:“string”}},“definitions”:{}}
2016-11-04 17:39:37,484 INFO - Creating resource ‘things’ on fxc4nbf1fl
2016-11-04 17:39:39,064 INFO - Creating method response for api 11w1czyng4 and method GET and status 200
2016-11-04 17:39:39,496 INFO - Found reference to existing model ThingList
2016-11-04 17:39:40,172 INFO - Creating method response for api 11w1czyng4 and method GET and status 500
2016-11-04 17:39:40,533 INFO - Found reference to existing model Error
2016-11-04 17:39:41,209 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Content-Type
2016-11-04 17:39:41,663 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Accept
2016-11-04 17:39:42,018 INFO - Creating integration with type AWS
2016-11-04 17:39:44,756 INFO - Creating method for api id 11w1czyng4 and resource id 9slb4w with method get
2016-11-04 17:39:45,766 INFO - Creating method response for api 11w1czyng4 and method OPTIONS and status 200
2016-11-04 17:39:47,180 INFO - Creating integration with type MOCK
2016-11-04 17:39:48,425 INFO - Creating method for api id 11w1czyng4 and resource id 9slb4w with method options
2016-11-04 17:39:48,857 INFO - Creating resource ‘{thingId}’ on 9slb4w
2016-11-04 17:39:50,270 INFO - Creating method response for api 11w1czyng4 and method GET and status 200
2016-11-04 17:39:50,483 INFO - Found reference to existing model Thing
2016-11-04 17:39:50,823 INFO - Creating method response for api 11w1czyng4 and method GET and status 400
2016-11-04 17:39:51,108 INFO - Found reference to existing model Error
2016-11-04 17:39:51,783 INFO - Creating method response for api 11w1czyng4 and method GET and status 404
2016-11-04 17:39:52,087 INFO - Found reference to existing model Error
2016-11-04 17:39:52,550 INFO - Creating method response for api 11w1czyng4 and method GET and status 500
2016-11-04 17:39:52,874 INFO - Found reference to existing model Error
2016-11-04 17:39:53,526 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Content-Type
2016-11-04 17:39:53,806 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Accept
2016-11-04 17:39:54,193 INFO - Creating integration with type AWS
2016-11-04 17:39:56,716 INFO - Creating method for api id 11w1czyng4 and resource id via0r3 with method get
2016-11-04 17:39:57,083 INFO - Creating method response for api 11w1czyng4 and method OPTIONS and status 200
2016-11-04 17:39:57,741 INFO - Creating integration with type MOCK
2016-11-04 17:39:58,737 INFO - Creating method for api id 11w1czyng4 and resource id via0r3 with method options
2016-11-04 17:39:59,718 INFO - Creating resource ‘audio’ on via0r3
2016-11-04 17:40:00,749 INFO - Creating resource ‘events’ on lfzdvv
2016-11-04 17:40:01,987 INFO - Creating method response for api 11w1czyng4 and method GET and status 200
2016-11-04 17:40:02,350 INFO - Found reference to existing model AudioEventList
2016-11-04 17:40:03,024 INFO - Creating method response for api 11w1czyng4 and method GET and status 404
2016-11-04 17:40:03,400 INFO - Found reference to existing model Error
2016-11-04 17:40:03,935 INFO - Creating method response for api 11w1czyng4 and method GET and status 500
2016-11-04 17:40:04,236 INFO - Found reference to existing model Error
2016-11-04 17:40:04,841 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Content-Type
2016-11-04 17:40:05,181 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Accept
2016-11-04 17:40:05,509 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.querystring.limit
2016-11-04 17:40:05,855 INFO - Creating integration with type AWS
2016-11-04 17:40:09,612 INFO - Creating method for api id 11w1czyng4 and resource id 5tj29g with method get
2016-11-04 17:40:10,104 INFO - Creating method response for api 11w1czyng4 and method OPTIONS and status 200
2016-11-04 17:40:10,771 INFO - Creating integration with type MOCK
2016-11-04 17:40:11,585 INFO - Creating method for api id 11w1czyng4 and resource id 5tj29g with method options
2016-11-04 17:40:12,284 INFO - Creating resource ‘led’ on via0r3
2016-11-04 17:40:12,732 INFO - Found input model reference AudioEvent
2016-11-04 17:40:13,103 INFO - Creating method response for api 11w1czyng4 and method POST and status 202
2016-11-04 17:40:13,711 INFO - Creating method response for api 11w1czyng4 and method POST and status 400
2016-11-04 17:40:13,928 INFO - Found reference to existing model Error
2016-11-04 17:40:14,358 INFO - Creating method response for api 11w1czyng4 and method POST and status 404
2016-11-04 17:40:14,567 INFO - Found reference to existing model Error
2016-11-04 17:40:15,008 INFO - Creating method response for api 11w1czyng4 and method POST and status 500
2016-11-04 17:40:15,240 INFO - Found reference to existing model Error
2016-11-04 17:40:15,723 INFO - Creating method parameter for api 11w1czyng4 and method POST with name method.request.header.Content-Type
2016-11-04 17:40:15,997 INFO - Creating method parameter for api 11w1czyng
2016-11-04 17:40:16,318 INFO - Creating integration with type AWS
2016-11-04 17:40:20,065 INFO - Creating method for api id 11w1czyng4 and resource id vego14 with method post
2016-11-04 17:40:20,752 INFO - Creating method response for api 11w1czyng4 and method GET and status 200
2016-11-04 17:40:21,114 INFO - Found reference to existing model LED
2016-11-04 17:40:21,645 INFO - Creating method response for api 11w1czyng4 and method GET and status 400
2016-11-04 17:40:21,940 INFO - Found reference to existing model Error
2016-11-04 17:40:22,532 INFO - Creating method response for api 11w1czyng4 and method GET and status 404
2016-11-04 17:40:22,839 INFO - Found reference to existing model Error
2016-11-04 17:40:23,486 INFO - Creating method response for api 11w1czyng4 and method GET and status 500
2016-11-04 17:40:23,822 INFO - Found reference to existing model Error
2016-11-04 17:40:24,441 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Content-Type
2016-11-04 17:40:24,799 INFO - Creating method parameter for api 11w1czyng4 and method GET with name method.request.header.Accept
2016-11-04 17:40:25,157 INFO - Creating integration with type AWS
2016-11-04 17:40:28,930 INFO - Creating method for api id 11w1czyng4 and resource id vego14 with method get
2016-11-04 17:40:29,617 INFO - Creating method response for api 11w1czyng4 and method OPTIONS and status 200
2016-11-04 17:40:30,466 INFO - Creating integration with type MOCK
2016-11-04 17:40:31,714 INFO - Creating method for api id 11w1czyng4 and resource id vego14 with method options
2016-11-04 17:40:31,717 INFO - Creating deployment for API 11w1czyng4 and stage dev
***Configuring Dashboard on S3…
Detected 11w1czyng4 as API Gateway Identifier
./setup.sh: line 297: config.js: Permission denied
make_bucket failed: s3://dragonconnect-crayfish An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation: Your previous request to create the named bucket succeeded and you already own it.
upload: css/db.css to s3://dragonconnect-crayfish/css/db.css
upload: css/bootstrap-theme.css to s3://dragonconnect-crayfish/css/bootstrap-theme.css
upload: css/bootstrap-theme.min.css to s3://dragonconnect-crayfish/css/bootstrap-theme.min.css
upload: css/styles.css to s3://dragonconnect-crayfish/css/styles.css
upload: css/font-awesome.css to s3://dragonconnect-crayfish/css/font-awesome.css
upload: css/font-awesome.min.css to s3://dragonconnect-crayfish/css/font-awesome.min.css
upload: css/bootstrap-theme.css.map to s3://dragonconnect-crayfish/css/bootstrap-theme.css.map
upload: fonts/fontawesome-webfont.eot to s3://dragonconnect-crayfish/fonts/fontawesome-webfont.eot
upload: fonts/FontAwesome.otf to s3://dragonconnect-crayfish/fonts/FontAwesome.otf
upload: fonts/fontawesome-webfont.woff2 to s3://dragonconnect-crayfish/fonts/fontawesome-webfont.woff2
upload: fonts/glyphicons-halflings-regular.eot to s3://dragonconnect-crayfish/fonts/glyphicons-halflings-regular.eot
upload: css/bootstrap.min.css to s3://dragonconnect-crayfish/css/bootstrap.min.css
upload: fonts/glyphicons-halflings-regular.ttf to s3://dragonconnect-crayfish/fonts/glyphicons-halflings-regular.ttf
upload: fonts/glyphicons-halflings-regular.woff2 to s3://dragonconnect-crayfish/fonts/glyphicons-halflings-regular.woff2
upload: fonts/glyphicons-halflings-regular.woff to s3://dragonconnect-crayfish/fonts/glyphicons-halflings-regular.woff
upload: gfxs/ajax-loader.gif to s3://dragonconnect-crayfish/gfxs/ajax-loader.gif
upload: gfxs/board.png to s3://dragonconnect-crayfish/gfxs/board.png
upload: gfxs/dragon-connect-logo@2x.png to s3://dragonconnect-crayfish/gfxs/dragon-connect-logo@2x.png
upload: css/bootstrap.css to s3://dragonconnect-crayfish/css/bootstrap.css
upload: gfxs/dragon-sense-logo@2x.png to s3://dragonconnect-crayfish/gfxs/dragon-sense-logo@2x.png
upload: gfxs/dragonboard410c_logo.png to s3://dragonconnect-crayfish/gfxs/dragonboard410c_logo.png
upload: fonts/fontawesome-webfont.ttf to s3://dragonconnect-crayfish/fonts/fontawesome-webfont.ttf
upload: gfxs/dragonboard410c_logo_bs.png to s3://dragonconnect-crayfish/gfxs/dragonboard410c_logo_bs.png
upload: gfxs/sprites-volume@2x.png to s3://dragonconnect-crayfish/gfxs/sprites-volume@2x.png
upload: fonts/fontawesome-webfont.woff to s3://dragonconnect-crayfish/fonts/fontawesome-webfont.woff
upload: gfxs/dragonpulse-logo@2x.png to s3://dragonconnect-crayfish/gfxs/dragonpulse-logo@2x.png
upload: gfxs/sprites@2x.png to s3://dragonconnect-crayfish/gfxs/sprites@2x.png
upload: gfxs/ready_to_fuel.png to s3://dragonconnect-crayfish/gfxs/ready_to_fuel.png
upload: gfxs/sprites-sensor@2x.png to s3://dragonconnect-crayfish/gfxs/sprites-sensor@2x.png
upload: gfxs/volume-bg-xs.jpg to s3://dragonconnect-crayfish/gfxs/volume-bg-xs.jpg
upload: gfxs/volume-bg-sm.jpg to s3://dragonconnect-crayfish/gfxs/volume-bg-sm.jpg
upload: gfxs/volume-bg-lg.jpg to s3://dragonconnect-crayfish/gfxs/volume-bg-lg.jpg
upload: js/config.js to s3://dragonconnect-crayfish/js/config.js
upload: ./index.html to s3://dragonconnect-crayfish/index.html
upload: gfxs/volume-bg-md.jpg to s3://dragonconnect-crayfish/gfxs/volume-bg-md.jpg
upload: js/config_template.js to s3://dragonconnect-crayfish/js/config_template.js
upload: gfxs/search.jpg to s3://dragonconnect-crayfish/gfxs/search.jpg
upload: gfxs/sprites-bulb@2x.png to s3://dragonconnect-crayfish/gfxs/sprites-bulb@2x.png
upload: things/lambdaTest/audio.json to s3://dragonconnect-crayfish/things/lambdaTest/audio.json
upload: fonts/glyphicons-halflings-regular.svg to s3://dragonconnect-crayfish/fonts/glyphicons-halflings-regular.svg
upload: js/npm.js to s3://dragonconnect-crayfish/js/npm.js
upload: things/lambdaTest/led.json to s3://dragonconnect-crayfish/things/lambdaTest/led.json
upload: things/things.json to s3://dragonconnect-crayfish/things/things.json
upload: js/dragonconnect.js to s3://dragonconnect-crayfish/js/dragonconnect.js
upload: js/bootstrap.min.js to s3://dragonconnect-crayfish/js/bootstrap.min.js
upload: js/jquery-1.11.1.min.js to s3://dragonconnect-crayfish/js/jquery-1.11.1.min.js
upload: fonts/fontawesome-webfont.svg to s3://dragonconnect-crayfish/fonts/fontawesome-webfont.svg
upload: js/moment.min.js to s3://dragonconnect-crayfish/js/moment.min.js
upload: css/bootstrap.css.map to s3://dragonconnect-crayfish/css/bootstrap.css.map
upload: js/bootstrap.js to s3://dragonconnect-crayfish/js/bootstrap.js
***Configuring Bucket Policy on S3…
./setup.sh: line 320: bucket-policy.json: Permission denied
***Provisioning a Thing…
Attaching policy DragonConnect to principal for thing 9a0675017cb7434489c1dca1c9f1c1a2
Detected 9a0675017cb7434489c1dca1c9f1c1a2 as Thing ID
***Installing Certificates for the Device…
***Building Client…
/usr/bin/ld: cannot open output file ./bin/aws_demo: Permission denied
collect2: error: ld returned 1 exit status
Makefile:71: recipe for target ‘all’ failed
make: *** [all] Error 1
################################################
Build Complete
################################################
linaro@linaro-alip:~/Documents/arrow/aws-iot-dragonconnect-c/scripts$