Month: December 2018

  • 4: /codebuild/output/tmp/script.sh: pip: not found – Node.js and CodeStar

    Hi everyone, I ran into the following CodeBuild error after upgrading my build environment from the default nodejs8.10 to nodejs10.14: 4: /codebuild/output/tmp/script.sh: pip: not found This one was a little confusing, but thankfully fairly easy to fix. In your buildspec.yml file update the pip steps to reference pip3 instead of pip: // Original commands: #…

  • mocha tests/* sh: 1: mocha: Permission denied – AWS CodeBuild with Node.js

    Hi everyone, I ran into the following error while running a Node.js build with AWS CodeBuild: mocha tests/* sh: 1: mocha: Permission denied To resolve this I removed node_modules from my repository and added it to .gitignore: node_modules/ Thanks to the following links for the info: Add node_modules to gitignore: https://stackoverflow.com/a/29820869/522859 Misc background issues: https://github.com/mochajs/mocha/issues/1487

  • Parsing DynamoDB Items – AWS Lambda with Node.js

    Hi everyone, A quick post on how to parse DynamoDB items into something more readable when using lambda with Node.js: Original: console.log(data[“Item”]); { CatBreedId: { S: ’17acbc81-2b4a-462b-be87-bcc49580b1ae’}, Name: { S: ‘Cat #1’} } Parsed: console.log(AWS.DynamoDB.Converter.unmarshall(data[“Item”])); { “CatBreedId”: “17acbc81-2b4a-462b-be87-bcc49580b1ae”, “Name”: “Cat #1” } Official doco is here: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/Converter.html Thanks to the following stackoverflow post for the…

  • Create DynamoDB Table – AWS CLI

    Hi everyone, A quick example of how to create a dynamodb table using the AWS CLI: aws dynamodb create-table –table-name CatBreeds –attribute-definitions AttributeName=CatBreedId,AttributeType=S –key-schema AttributeName=CatBreedId,KeyType=HASH –provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 For more info the following AWS page helped me: https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html

  • Check if Running Locally – AWS SAM & NodeJS

    Hi everyone, Just a quick post on how to check if code is being run locally with AWS SAM and NodeJS: // 8+ isRunningLocally = () => { return process.env.AWS_SAM_LOCAL === ‘true’; } // 6+ function isRunningLocally() { return process.env.AWS_SAM_LOCAL === ‘true’; }

  • rocksmith 2014.exe has stopped working windows 10 Faulting module name: igdumd32.dll

    Hi everyone, Bit of a different topic but I was using Rocksmith 2014 and ran into the following error: rocksmith 2014.exe has stopped working windows 10 Faulting module name: igdumd32.dll The fix is pretty easy, but somewhat annoying, unplug any external monitors (second, third monitor).

  • AWS IoT – error in discovery certificate_verify_failed

    Hi everyone, I ran into the following error while using the AWS IoT python SDK: Error in discovery! Type: Error message: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720) It turns out that this was because I was using the wrong root certificate. In the documentation there are five certificates listed: RSA 2048 bit key: VeriSign Class…

  • Update Wireless Info on Raspberry Pi

    Hi everyone, Just a quick post on how to configure wireless info on a raspberry pi. To start with, open the config file: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf You can then add any number of connections to the file with varying priorities: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=AU network={ ssid=”Mobile Network” psk=”YOUR_PASSWORD” key_mgmt=WPA-PSK priority=2 } network={ ssid=”Home Network” psk=”YOUR_PASSWORD”…

  • Fetch As Google Error – ReactJs

    Hi everyone, I ran into the following error while using “fetch as Google” and none of my pages were being indexed correctly: Uncaught TypeError: undefined is not a function It took a while to find a solution but after some Googling I found that GoogleBot currently uses Chrome v41. You can download the mini installer…

Create a website or blog at WordPress.com