hello_world example not working
See original GitHub issueDescription:
I have created the hello_world example from https://github.com/awslabs/aws-sam-cli/blob/develop/docs/getting_started.rst and followed the steps from README.md to build and execute a local server.
But when acessing the server from http://127.0.0.1:3001/hello (also tried http://127.0.0.1:3001) I get the following response:
{"Type": "LocalService", "Message": "PathNotFoundException"}
Steps to reproduce the issue:
Install Miniconda Python 3.6<miniconda_bin_dir>/pip install aws-sam-cli<miniconda_bin_dir>/sam init --runtime python3.6cd sam-app<miniconda_bin_dir>/pip install -r requirements.txt -t hello_world/build/cp hello_world/*.py hello_world/build/<miniconda_bin_dir>/sam --debug local start-lambda
Observed result:
The following response from http://127.0.0.1:3001/hello:
{"Type": "LocalService", "Message": "PathNotFoundException"}
Expected result:
The actual output from app.py
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Linux Mint 18
Docker version 18.06.0-ce, build 0ffa825
Miniconda Python 3.6.5
Output of sam --version:
SAM CLI, version 0.6.0
Optional Debug logs:
$ sam --debug local start-lambda
2018-08-30 23:19:57 local start_lambda command is called
2018-08-30 23:19:57 2 resources found in the template
2018-08-30 23:19:57 Found Serverless function with name='HelloWorldFunction' and CodeUri='hello_world/build/'
2018-08-30 23:19:57 Trying paths: ['/home/caian/.docker/config.json', '/home/caian/.dockercfg']
2018-08-30 23:19:57 No config file found
2018-08-30 23:19:57 Trying paths: ['/home/caian/.docker/config.json', '/home/caian/.dockercfg']
2018-08-30 23:19:57 No config file found
2018-08-30 23:19:57 http://localhost:None "GET /v1.35/_ping HTTP/1.1" 200 2
2018-08-30 23:19:57 Trying paths: ['/home/caian/.docker/config.json', '/home/caian/.dockercfg']
2018-08-30 23:19:57 No config file found
2018-08-30 23:19:57 Trying paths: ['/home/caian/.docker/config.json', '/home/caian/.dockercfg']
2018-08-30 23:19:57 No config file found
2018-08-30 23:19:57 Starting the Local Lambda Service. You can now invoke your Lambda Functions defined in your template through the endpoint.
2018-08-30 23:19:57 Localhost server is starting up. Multi-threading = True
2018-08-30 23:19:57 * Running on http://127.0.0.1:3001/ (Press CTRL+C to quit)
2018-08-30 23:23:28 127.0.0.1 - - [30/Aug/2018 23:23:28] "GET /hello HTTP/1.1" 404 -
2018-08-30 23:23:33 127.0.0.1 - - [30/Aug/2018 23:23:33] "GET / HTTP/1.1" 404 -
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Hello World Example not working · Issue #211 · Gottwik/Enduro
I'm trying to run the hello world example, but am getting the following error when loading the admin interface:.
Read more >Spring Boot Hello World Example Not working - Stack Overflow
Try cleaning the project from project tab, Add all the maven dependencies to eclipse build path. Then try running it as java application....
Read more >MuleSoft's Hello World example not working
MuleSoft's Hello World example not working. This is the very most basic example offered by MuleSoft and anyone learning any type of technical...
Read more >Hello world example not work - Code Composer Studio forum
Looks like CCS is not finding file stdio. h. - Open "Build", "MSP430 Compiler", then click "Include Options". Hope this will work for...
Read more >helloworld example not working - Google Groups
helloworld example not working. 44 views. Skip to first unread message ... Failed to define class org.jboss.as.quickstarts.helloworld.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Caian You are running the wrong command. The README for
sam initstates to runsam local start-api.sam local start-lambdaruns a localhost service that mimics the invoke path on the Lambda service locally, so you can invoke the functions locally through AWS CLI or AWS SDKs.Closing as this is not an issue and the wrong command was run.
If you run
sam local start-lambdayou can communicate directly with the locally running lambda service:If you run
sam local start-api, it starts a local API gateway and you can make HTTP requests to:http://127.0.0.1:3001/register