aws-lambda-blog
aws-lambda-blog copied to clipboard
Small Install issue
I installed this twice: once for testing, and once "for real". The second time I got this error during the install via "node install.js":
unable to sync: UnknownEndpoint: Inaccessible host: `s3-ap-northeast-1.amazonaws.com'. This service may not be available in the `ap-northeast-1' region.
at Request.ENOTFOUND_ERROR (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/event_listeners.js:456:46)
at Request.callListeners (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/request.js:683:14)
at ClientRequest.error (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/event_listeners.js:295:22)
at ClientRequest.<anonymous> (/home/harald/github/aws-lambda-blog/node_modules/aws-sdk/lib/http/node.js:89:19)
at emitOne (events.js:121:20)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
The end-result was 2 files missing in the /static/js/ S3 bucket. Adding them and changing permissions to "public read" fixed this. It seems error checking or the retry algo is not sufficient.
That said, this is awesome. I always thought Lambda+DynamoDB is sufficient to make a blog, and you prooved it!
Thanks for the report. Yeah I dont know exacty what to do about that as the S3 api didnt return the event when the file upload completes last time I checked.
I think you can use a waiter? https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#waitFor-property