sakazuki / aws-serverless-node-red

Node-RED on AWS Lambda using Amazon API Gateway and S3
Apache License 2.0
91 stars 26 forks source link

Lambda deploy not working for me. #1

Open goynese opened 6 years ago

goynese commented 6 years ago

Hello. I deployed this following your steps. I put in my account number, bucket name, region, function, and stack name into the node run config command. When I execute the API command from CloudFormation output with a GET request I get this.

GET request to this url https://numbers.execute-api.us-west-2.amazonaws.com/prod/

I get a 404 with this page. <!DOCTYPE html>

Error
Cannot GET /

Here are the logs that my lambda is putting into CloudWatch.


2018-08-07T20:58:46.094Z    ac21638f-9a84-11e8-98df-21d5192a2f92    prepop flows
2018-08-07T20:58:46.201Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:46 - [info] 

Welcome to Node-RED
===================

2018-08-07T20:58:46.201Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:46 - [info] Node-RED version: v0.18.7
2018-08-07T20:58:46.201Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:46 - [info] Node.js version: v6.10.3
2018-08-07T20:58:46.202Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:46 - [info] Linux 4.9.93-41.60.amzn1.x86_64 x64 LE
2018-08-07T20:58:46.822Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:46 - [info] Loading palette nodes
2018-08-07T20:58:48.162Z    ac21638f-9a84-11e8-98df-21d5192a2f92    save settings
2018-08-07T20:58:48.232Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] ------------------------------------------------------
2018-08-07T20:58:48.232Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
2018-08-07T20:58:48.232Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] ------------------------------------------------------
2018-08-07T20:58:48.232Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] Missing node modules:
2018-08-07T20:58:48.233Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] - node-red-analyze-node (1.0.0): analyze
2018-08-07T20:58:48.233Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] - node-red-encode-node (1.0.0): mediaconvert-encode
2018-08-07T20:58:48.233Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] - node-red-publish-node (1.0.0): publish
2018-08-07T20:58:48.233Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [warn] - node-red-rules-node (1.0.0): rules
2018-08-07T20:58:48.233Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [info] Removing modules from config
2018-08-07T20:58:48.238Z    ac21638f-9a84-11e8-98df-21d5192a2f92    save settings
2018-08-07T20:58:48.256Z    ac21638f-9a84-11e8-98df-21d5192a2f92    Node-RED server started.
2018-08-07T20:58:48.313Z    ac21638f-9a84-11e8-98df-21d5192a2f92    no entry found for key nodered-alex/credential.json
2018-08-07T20:58:48.316Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [info] Starting flows
2018-08-07T20:58:48.318Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:48 - [info] Started flows
2018-08-07T20:58:49.300Z    ac21638f-9a84-11e8-98df-21d5192a2f92    no entry found for key nodered-alex/credential.json
2018-08-07T20:58:49.302Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:49 - [info] Stopping flows
2018-08-07T20:58:49.304Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:49 - [info] Stopped flows
2018-08-07T20:58:49.305Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:49 - [info] Starting flows
2018-08-07T20:58:49.305Z    ac21638f-9a84-11e8-98df-21d5192a2f92    7 Aug 20:58:49 - [info] Started flows
END RequestId: ac21638f-9a84-11e8-98df-21d5192a2f92
REPORT RequestId: ac21638f-9a84-11e8-98df-21d5192a2f92  Duration: 3433.02 ms    Billed Duration: 3500 ms Memory Size: 1024 MB   Max Memory Used: 118 MB 
START RequestId: dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6 Version: $LATEST
2018-08-07T21:07:21.444Z    dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6    no entry found for key nodered-alex/credential.json
2018-08-07T21:07:21.446Z    dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6    7 Aug 21:07:21 - [info] Stopping flows
2018-08-07T21:07:21.455Z    dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6    7 Aug 21:07:21 - [info] Stopped flows
2018-08-07T21:07:21.455Z    dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6    7 Aug 21:07:21 - [info] Starting flows
2018-08-07T21:07:21.455Z    dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6    7 Aug 21:07:21 - [info] Started flows
END RequestId: dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6
REPORT RequestId: dfe9f615-9a85-11e8-832c-0b1f2b3a9ad6  Duration: 158.50 ms Billed Duration: 200 ms Memory Size: 1024 MB    Max Memory Used: 118 MB ```
sakazuki commented 6 years ago

Hello, @goynese Did you make a flow using HTTP in nodes ? If you can try to read Japanese, This article will help you . (See. step 4, 5, 6) https://qiita.com/sakazuki/items/9d55ac14432e73524e04

Regards,