aws-lambda-blog icon indicating copy to clipboard operation
aws-lambda-blog copied to clipboard

Small Install issue

Open haraldkubota opened this issue 7 years ago • 2 comments

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!

haraldkubota avatar Dec 17 '17 05:12 haraldkubota

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.

sirceljm avatar Dec 18 '17 18:12 sirceljm

I think you can use a waiter? https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#waitFor-property

hughesjj avatar Apr 22 '18 05:04 hughesjj